[Asio]How to solve the link wrongs in Mingw ?
Sorry,this is a beginner question, Maybe waste your time here :) When I build the examples of tutorial asio 0.37 in Mingw , the compiler tell me " undefined reference to `WinMain@16'" at the last step. I try google anywhere ,but still can't the right way. the wrong messages $ bjam -sTOOLS=mingw ...found 1176 targets... ...updating 12 targets... gcc-Link-action ..\..\..\..\bin\boost\libs\asio\example\tutorial\timer1.exe\mingw\debug\threading-multi\timer1.exe F:/job/environment/mingw/mingw/bin/../lib/gcc/i686-pc-mingw32/3.4.2/../../../libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `WinMain@16' collect2: ld returned 1 exit status "g++" "-Wl,--enable-auto-image-base" -g -mthreads -Wl,--allow-multiple-definition -mno-cygwin -o "..\..\..\..\bin\boost\libs\asio\example\tutorial\timer1.exe\mingw\debug\threading-multi\timer1.exe" -L"../../../../bin/boost/libs/thread/build/libboost_thread.lib/mingw/debug/threading-multi" -L"" "..\..\..\..\bin\boost\libs\asio\example\tutorial\timer1.exe\mingw\debug\threading-multi\timer.obj" "..\..\..\..\bin\boost\libs\thread\build\libboost_thread.lib\mingw\debug\threading-multi\libboost_thread-mgw-mt-d-1_33_1.lib" "..\..\..\..\bin\boost\libs\thread\build\libboost_thread.lib\mingw\debug\threading-multi\libboost_thread-mgw-mt-d-1_33_1.lib" -lws2_32 -lmswsock and so on........ --
participants (1)
-
SP Z