|
Boost-Build : |
Subject: [Boost-build] Compile fails with boost on cygwin
From: Bobby Singh (bobby54321_at_[hidden])
Date: 2010-08-26 11:53:45
Compile fails with the following error when attempting to make use of the
boost_1_43_0 library on cygwin
(uname -a: CYGWIN_NT-5.1 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin, gcc
--version: gcc (GCC) 3.4.4)
on a windows xp machine (on an eclipse ide):
Building file: ../src/SocketFactory.cpp
Invoking: Cygwin C++ Compiler
g++ -I/cygdrive/c/Sandbox/logging/inc -I/cygdrive/c/Sandbox/common/inc
-I/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/SocketFactory.d" -MT"src/SocketFactory.d"
-o"src/SocketFactory.o" "../src/SocketFactory.cpp"
In file included from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio/detail/win_iocp_io_service_fwd.hpp:24,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio/detail/reactor_fwd.hpp:24,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio/io_service.hpp:30,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio/basic_io_object.hpp:20,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio/basic_socket.hpp:24,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio/basic_datagram_socket.hpp:25,
from /cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/asio.hpp:20,
from /cygdrive/c/Sandbox/common/inc/SocketUdpLinux.h:5,
from ../src/SocketFactory.cpp:3:
/cygdrive/c/Sandbox/SHOI4466/boost_1_43_0/cygwin/include/boost/asio/detail/socket_types.hpp:37:5:
warning: #warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
/cygdrive/c/Sandbox/SHOI4466/boost_1_43_0/cygwin/include/boost/asio/detail/socket_types.hpp:38:5:
warning: #warning For example, add -D_WIN32_WINNT=0x0501 to the compiler
command line.
/cygdrive/c/Sandbox/SHOI4466/boost_1_43_0/cygwin/include/boost/asio/detail/socket_types.hpp:39:5:
warning: #warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
/cygdrive/c/Sandbox/SHOI4466/boost_1_43_0/cygwin/include/boost/asio/detail/socket_types.hpp:78:5:
#error You must add -D__USE_W32_SOCKETS to your compiler options.
Note that I built the boost library on the cygwin console, and the boost
include/, bin/ and lib/ for the
build are located there. The above error is strange as it states that I should
use the -D__USE_W32_SOCKETS
option when I really want to use the cygwin socket library (posix).
And if I do use the -D__USE_W32_SOCKETS option, then I get the following error:
Building file: ../src/Event.cpp
Invoking: Cygwin C++ Compiler
g++ -D__USE_W32_SOCKETS -D_WIN32_WINDOWS -I/cygdrive/c/Sandbox/logging/inc
-I/cygdrive/c/Sandbox/common/inc
-I/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/Event.d" -MT"src/Event.d" -o"src/Event.o"
"../src/Event.cpp"
In file included from /usr/include/cygwin/sys_time.h:13,
from /usr/include/sys/time.h:27,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/date_time/c_time.hpp:31,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/date_time/microsec_time_clock.hpp:21,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread/thread_time.hpp:9,
from /cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread/locks.hpp:12,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread/pthread/mutex.hpp:12,
from /cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread/mutex.hpp:16,
from
/cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread/pthread/thread_data.hpp:12,
from /cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread/thread.hpp:17,
from /cygdrive/c/Sandbox/boost_1_43_0/cygwin/include/boost/thread.hpp:13,
from /cygdrive/c/Sandbox/common/inc/Mutex.h:5,
from /cygdrive/c/Sandbox/common/inc/Event.h:4,
from ../src/Event.cpp:1:
/usr/include/sys/select.h:31: error: `fd_set' has not been declared
/usr/include/sys/select.h:31: error: `fd_set' has not been declared
/usr/include/sys/select.h:31: error: `fd_set' has not been declared
/usr/include/sys/select.h:33: error: `fd_set' has not been declared
/usr/include/sys/select.h:33: error: `fd_set' has not been declared
/usr/include/sys/select.h:33: error: `fd_set' has not been declared
make: *** [src/Event.o] Error 1
Would appreciate any feedback on how to resolve this problem. Thanks.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk