Usually I can google find the way and find solutions, but not this time.
I am using 64-bit Linux Ubuntu 11.04 to compile a 32-bit windowed application. I am using i586-mingw32msvc-gcc to compile my files in C ++.
test.cpp:
#include <boost/asio.hpp>
Makefile:
i586-mingw32msvc-gcc -c -m32 -mthreads -o test.o test.cpp
Error:
boost/asio/detail/socket_types.hpp: # include <sys/ioctl.h> doesn't exist.
Added to makefile: -DBOOST_WINDOWS
Error: # warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately
Good, added to makefile: -D_WIN32_WINNT = 0x0501
Error: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
However, I specified -mthreads.
source share