|
|
The compiler wrote: |
---|
In function `thread<main()::<lambda()> >': [Linker error] c:/program files/mingw/bin/../lib/gcc/mingw32/4.7.0/include/c++/boost/thread/detail/thread.hpp:186: undefined reference to `__imp___ZN5boost6thread12start_threadEv' In function `__static_initialization_and_destruction_0': [Linker error] c:/program files/mingw/bin/../lib/gcc/mingw32/4.7.0/include/c++/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()' [Linker error] c:/program files/mingw/bin/../lib/gcc/mingw32/4.7.0/include/c++/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()' [Linker error] c:/program files/mingw/bin/../lib/gcc/mingw32/4.7.0/include/c++/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()' In function `_ZN5boost16thread_exceptionC2EiPKc': [Linker error] c:/program files/mingw/bin/../lib/gcc/mingw32/4.7.0/include/c++/boost/thread/exceptions.hpp:49: undefined reference to `boost::system::system_category()' In function `_ZN5boost6threadD1Ev': [Linker error] c:/program files/mingw/bin/../lib/gcc/mingw32/4.7.0/include/c++/boost/thread/detail/thread.hpp:174: undefined reference to `__imp___ZN5boost6thread6detachEv' C:\Users\Vilim\Desktop\New folder\collect2.exe [Error] ld returned 1 exit status |
$ g++ -std=c++0x -c thread.cpp $ g++ thread.o -lboost_thread -lboost_system -o thread.bin |
The console wrote: |
---|
Cannot execute C:\USERS\VILIM\DESKTOP\NEW FOLDER\NEIMENOVANO2.EXE |
Major Tom wrote: |
---|
Also, for the threading problem, is there a namespace in thread.h that you aren't using? |
|
|
But it still doesn't work! (...) I needed to run it from cmd to see what it wrote! |