This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

compilation under cygwin


Hi everbody!

I tried to compile my program with gcc (version 3.4.4) under cygwin and used
the following Makefile:
#######################################################

CC		= g++
CFLAGS		= -D__USE_W32_SOCKETS -D_WIN32_WINDOWS=0x0501 
LDLAGS		= -D__USE_W32_SOCKETS -D_WIN32_WINDOWS=0x0501 
LIBS		= -lpthread -lcurl -lcurlpp -lboost_thread-gcc-mt -lboost_regex-gcc-mt -lstdc++ -lws2_32 -lxml2 -lssl -lcrypto 
REC_OBJ		= HTTPServer.o ImageStorage.o RTSPProtocolConverter.o RTSPMoRIsConverter.o MoRISCmdErrorParser.o StsObjectBuilder.o TrafficMessage.o \
		HTTPDispatcher.o RTSPClient.o RecordingController.o PQueue.o MPEG4MulticastReceiver.o XMLParser.o Basic.o Station.o Object.o \
		/usr/local/live/UsageEnvironment/libUsageEnvironment.a /usr/local/live/groupsock/libgroupsock.a /usr/local/live/liveMedia/libliveMedia.a \
		/usr/local/live/BasicUsageEnvironment/libBasicUsageEnvironment.a
MORIS_OBJ	= HTTPServer.o
REC_TARGET	= RecordingController
MORIS_TARGET	= MoRISRecorder
SRC		= $(OBJ:%.o=%.cpp)
INCLUDES	= -I/usr/local/include/curl -I/usr/local/include/curlpp -I/usr/include/boost-1_33_1 \
		-I/usr/local/live/UsageEnvironment/include -I/usr/local/live/groupsock/include -I/usr/local/live/liveMedia/include \
		-I/usr/local/live/BasicUsageEnvironment/include -I/usr/local/include -I/usr/include/libxml2 \
		-I/usr/include/w32api -I/usr/include
		
LIB_PATH	= -L/usr/lib -L/usr/lib/w32api 

$(REC_TARGET): $(REC_OBJ)
	$(CC) $(LDLAGS) -o $(REC_TARGET) $(REC_OBJ) $(LIB_PATH) $(LIBS) 

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< $(INCLUDES)


clean:
	rm -f *.o $(REC_TARGET) $(MORIS_TARGET)

########################################################


Unfortunately I got the following error message:


########################################################

In file included from /usr/include/cygwin/sys_time.h:13,
                 from /usr/include/sys/time.h:27,
                 from /usr/include/sys/socket.h:16,
                 from /usr/local/include/curl/curl.h:70,
                 from /usr/local/include/curlpp/cURLpp.hpp:32,
                 from HTTPServer.cpp:7:
/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
In file included from /usr/local/include/curl/curl.h:1792,
                 from /usr/local/include/curlpp/cURLpp.hpp:32,
                 from HTTPServer.cpp:7:
/usr/local/include/curl/multi.h:132: error: `fd_set' has not been declared
/usr/local/include/curl/multi.h:133: error: `fd_set' has not been declared
/usr/local/include/curl/multi.h:134: error: `fd_set' has not been declared
In file included from /usr/local/include/asio/detail/socket_types.hpp:75,
                 from /usr/local/include/asio/error.hpp:26,
                 from /usr/local/include/asio/error_code.hpp:160,
                 from /usr/local/include/asio/io_service.hpp:28,
                 from /usr/local/include/asio/basic_io_object.hpp:20,
                 from /usr/local/include/asio/basic_socket.hpp:24,
                 from /usr/local/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/local/include/asio.hpp:18,
                 from HTTPServer.h:13,
                 from HTTPServer.cpp:13:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:109: error: redefinition of `struct timeval'
/usr/include/sys/time.h:16: error: previous definition of `struct timeval'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:128: error: redefinition of `struct linger'
/usr/include/cygwin/socket.h:59: error: previous definition of `struct linger'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:336: error: redefinition of `struct sockaddr'
/usr/include/cygwin/socket.h:29: error: previous definition of `struct sockaddr'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:356: error: redefinition of `struct sockaddr_storage'
/usr/include/cygwin/socket.h:41: error: previous definition of `struct sockaddr_storage'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:536: error: declaration of C function `SOCKET accept(SOCKET, sockaddr*, int*)' conflicts with
/usr/include/sys/socket.h:29: error: previous declaration `int accept(int, sockaddr*, socklen_t*)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:537: error: declaration of C function `int bind(SOCKET, const sockaddr*, int)' conflicts with
/usr/include/sys/socket.h:30: error: previous declaration `int bind(int, const sockaddr*, socklen_t)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:539: error: declaration of C function `int connect(SOCKET, const sockaddr*, int)' conflicts with
/usr/include/sys/socket.h:31: error: previous declaration `int connect(int, const sockaddr*, socklen_t)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:541: error: declaration of C function `int getpeername(SOCKET, sockaddr*, int*)' conflicts with
/usr/include/sys/socket.h:32: error: previous declaration `int getpeername(int, sockaddr*, socklen_t*)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:542: error: declaration of C function `int getsockname(SOCKET, sockaddr*, int*)' conflicts with
/usr/include/sys/socket.h:33: error: previous declaration `int getsockname(int, sockaddr*, socklen_t*)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:543: error: declaration of C function `int getsockopt(SOCKET, int, int, char*, int*)' conflicts with
/usr/include/sys/socket.h:46: error: previous declaration `int getsockopt(int, int, int, void*, socklen_t*)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:546: error: declaration of C function `int listen(SOCKET, int)' conflicts with
/usr/include/sys/socket.h:34: error: previous declaration `int listen(int, int)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:547: error: declaration of C function `int recv(SOCKET, char*, int, int)' conflicts with
/usr/include/sys/socket.h:35: error: previous declaration `int recv(int, void*, size_t, int)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:548: error: declaration of C function `int recvfrom(SOCKET, char*, int, int, sockaddr*, int*)' conflicts with
/usr/include/sys/socket.h:37: error: previous declaration `int recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:549: error: declaration of C function `int send(SOCKET, const char*, int, int)' conflicts with
/usr/include/sys/socket.h:39: error: previous declaration `int send(int, const void*, size_t, int)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:550: error: declaration of C function `int sendto(SOCKET, const char*, int, int, const sockaddr*, int)' conflicts with
/usr/include/sys/socket.h:42: error: previous declaration `int sendto(int, const void*, size_t, int, const sockaddr*, socklen_t)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:551: error: declaration of C function `int setsockopt(SOCKET, int, int, const char*, int)' conflicts with
/usr/include/sys/socket.h:44: error: previous declaration `int setsockopt(int, int, int, const void*, socklen_t)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:552: error: declaration of C function `int shutdown(SOCKET, int)' conflicts with
/usr/include/sys/socket.h:47: error: previous declaration `int shutdown(int, int)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:553: error: declaration of C function `SOCKET socket(int, int, int)' conflicts with
/usr/include/sys/socket.h:48: error: previous declaration `int socket(int, int, int)' here
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:632: error: declaration of C function `int select(int, fd_set*, fd_set*, fd_set*, const timeval*)' conflicts with
/usr/include/sys/select.h:31: error: previous declaration `int select(int, int*, int*, int*, timeval*)' here
In file included from /usr/local/live/liveMedia/include/FramedSource.hh:25,
                 from /usr/local/live/liveMedia/include/MediaSink.hh:25,
                 from /usr/local/live/liveMedia/include/RTPSink.hh:25,
                 from /usr/local/live/liveMedia/include/MultiFramedRTPSink.hh:26,
                 from /usr/local/live/liveMedia/include/AudioRTPSink.hh:25,
                 from /usr/local/live/liveMedia/include/MPEG1or2AudioRTPSink.hh:25,
                 from /usr/local/live/liveMedia/include/liveMedia.hh:27,
                 from MPEG4MulticastReceiver.h:14,
                 from CameraConnection.h:13,
                 from ImageStorage.h:9,
                 from HTTPServer.h:14,
                 from HTTPServer.cpp:13:
/usr/local/live/groupsock/include/NetCommon.h:38:1: warning: "EWOULDBLOCK" redefined
In file included from /usr/include/errno.h:9,
                 from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cerrno:48,
                 from /usr/local/include/asio/error.hpp:21,
                 from /usr/local/include/asio/error_code.hpp:160,
                 from /usr/local/include/asio/io_service.hpp:28,
                 from /usr/local/include/asio/basic_io_object.hpp:20,
                 from /usr/local/include/asio/basic_socket.hpp:24,
                 from /usr/local/include/asio/basic_datagram_socket.hpp:25,
                 from /usr/local/include/asio.hpp:18,
                 from HTTPServer.h:13,
                 from HTTPServer.cpp:13:
/usr/include/sys/errno.h:153:1: warning: this is the location of the previous definition
/usr/include/boost-1_33_1/boost/date_time/microsec_time_clock.hpp: In static member function `static time_type boost::date_time::microsec_clock<time_type>::create_time(boost::date_time::microsec_clock<time_type>::TZ_FOR_CREATE) [with time_type = boost::posix_time::ptime]':
/usr/include/boost-1_33_1/boost/date_time/microsec_time_clock.hpp:80:   instantiated from `static time_type boost::date_time::microsec_clock<time_type>::universal_time() [with time_type = boost::posix_time::ptime]'
/usr/local/include/asio/time_traits.hpp:45:   instantiated from here
/usr/include/boost-1_33_1/boost/date_time/microsec_time_clock.hpp:86: error: call of overloaded `gettimeofday(timeval*, int)' is ambiguous
/usr/include/sys/time.h:73: note: candidates are: int gettimeofday(timeval*, void*)
/usr/local/live/groupsock/include/GroupsockHelper.hh:122: note:  int gettimeofday(timeval*, int*)
make: *** [HTTPServer.o] Error 1

###################################################

I hope someone of you can help me. I have allready searched the Internet, but I couldn't find a solution.

Best regards
Marian


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]