id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 1053,Error using boost::mutex and C++/CLI,fpelliccioni@…,Anthony Williams,"Hello, I have the following code: //---- first.h #ifndef _first_h_included_ #define _first_h_included_ #include #include #include namespace test_first { static boost::mutex io_mutex; struct console { public: static void write(std::string s); }; } #endif //---- END first.h //---- first.cpp #include ""first.h"" namespace test_first { void console::write(std::string s) { { boost::mutex::scoped_lock sl(io_mutex); std::cout << s; } } } //---- END first.cpp I compile this code using Visual Studio 2005 as a LIB file. I compile withOUT /CLR option. The problem is in the next file, ""executable.cpp"". //---- executable.cpp #include #include ""first.h"" int main (int argc, char *argv[]) { test_first::console::write(""fer""); std::cin.get(); return 0; } //---- END executable.cpp When I try to use this LIB in a C++/CLI source file, compiled with /CLR option, I have the followings errors: Error 1 error LNK2005: ""public: void __thiscall std::_Mutex::_Lock(void)"" (?_Lock@_Mutex@std@@QAEXXZ) already defined in msvcprt.lib(MSVCP80.dll) libcpmt.lib Error 2 error LNK2005: ""public: void __thiscall std::_Mutex::_Unlock(void)"" (?_Unlock@_Mutex@std@@QAEXXZ) already defined in msvcprt.lib(MSVCP80.dll) libcpmt.lib Error 3 fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-s-1_34.lib' Executable The boost::mutex LIB file that I use is: ""libboost_thread-vc80-mt-1_34.lib"". Thanks to all. Fernando Pelliccioni. Buenos Aires, Argentina. ",Support Requests,closed,To Be Determined,thread,Boost 1.34.0,Showstopper,invalid,c++/cli mutex clr,