delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/05/08:20:40

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Subject: compilation - cygwin -mno-cygwin-flag
From: "Marian Kogler" <m1kogler AT edu DOT uni-klu DOT ac DOT at>
To: cygwin AT cygwin DOT com
Date: Tue, 05 Aug 2008 14:19:49 +0200
X-Mailer: NetMail ModWeb Module
X-Sender: m1kogler
MIME-Version: 1.0
Message-ID: <1217938789.559f6e7cm1kogler@edu.uni-klu.ac.at>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m75CKce4019803

Hi everybody!

I tried to compile my program with the -mno-cygwin flag like this: 

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

CC		= g++
CFLAGS		= -D__USE_W32_SOCKETS -D_WIN32_WINDOWS=0x0501 -mno-cygwin
LDLAGS		= -D__USE_W32_SOCKETS -D_WIN32_WINDOWS=0x0501 -mno-cygwin
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/home/marian/mingw/include \
		-I/usr/include/w32api -I/usr/include
		
LIB_PATH	= -L/usr/lib -L/usr/lib/w32api -L/home/marian/mingw/lib

$(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)


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


At compile time I got the following warnings, which seem to have no influence on
the compilation:




In file included from /usr/local/include/curlpp/global.h:28,
                 from /usr/local/include/curlpp/Types.hpp:27,
                 from /usr/local/include/curlpp/CurlHandle.hpp:32,
                 from /usr/local/include/curlpp/Easy.hpp:28,
                 from HTTPServer.cpp:8:
/usr/local/include/curlpp/config.win32.h:61:1: warning: "STDC_HEADERS" redefined
In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iostream:44,
                 from HTTPServer.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/c++config.h:981:1: warning: this is the location of the previous definition
In file included from /usr/local/include/curlpp/global.h:28,
                 from /usr/local/include/curlpp/Types.hpp:27,
                 from /usr/local/include/curlpp/CurlHandle.hpp:32,
                 from /usr/local/include/curlpp/Easy.hpp:28,
                 from CameraConnection.h:9,
                 from ImageStorage.h:9,
                 from ImageStorage.cpp:1:
/usr/local/include/curlpp/config.win32.h:61:1: warning: "STDC_HEADERS" redefined
In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iostream:44,
                 from ImageStorage.h:4,
                 from ImageStorage.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/c++config.h:981:1: warning: this is the location of the previous definition
In file included from /usr/local/include/curlpp/global.h:28,
                 from /usr/local/include/curlpp/Types.hpp:27,
                 from /usr/local/include/curlpp/CurlHandle.hpp:32,
                 from /usr/local/include/curlpp/Easy.hpp:28,
                 from CameraConnection.h:9,
                 from ImageStorage.h:9,
                 from HTTPServer.h:14,
                 from RecordingController.cpp:8:
/usr/local/include/curlpp/config.win32.h:61:1: warning: "STDC_HEADERS" redefined
In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iostream:44,
                 from RecordingController.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/i686-pc-mingw32/bits/c++config.h:981:1: warning: this is the location of the previous definition


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

When I tried to link the "o - files" I got the following error messages:



Warning: resolving _gethostname by linking to _gethostname AT 8
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
Warning: resolving _setsockopt by linking to _setsockopt AT 20
Warning: resolving _bind by linking to _bind AT 12
Warning: resolving _connect by linking to _connect AT 12
Warning: resolving _accept by linking to _accept AT 12
Warning: resolving _listen by linking to _listen AT 8

HTTPServer.o:HTTPServer.cpp:(.text$_ZN5boost9condition7do_waitINS_5mutexEEEvRT_[void boost::condition::do_wait<boost::mutex>(boost::mutex&)]+0x10): undefined reference to `boost::detail::condition_impl::enter_wait()'
HTTPServer.o:HTTPServer.cpp:(.text$_ZN5boost9condition7do_waitINS_5mutexEEEvRT_[void boost::condition::do_wait<boost::mutex>(boost::mutex&)]+0x30): undefined reference to `boost::detail::condition_impl::do_wait()'
HTTPServer.o:HTTPServer.cpp:(.text$_ZN5boost6detail6thread8lock_opsINS_5mutexEE6unlockERS3_RPv[boost::detail::thread::lock_ops<boost::mutex>::unlock(boost::mutex&, void*&)]+0x14): undefined reference to `boost::mutex::do_unlock(void*&)'
HTTPServer.o:HTTPServer.cpp:(.text$_ZN5boost6detail6thread8lock_opsINS_5mutexEE4lockERS3_RPv[boost::detail::thread::lock_ops<boost::mutex>::lock(boost::mutex&, void*&)]+0x14): undefined reference to `boost::mutex::do_lock(void*&)'
MPEG4MulticastReceiver.o:MPEG4MulticastReceiver.cpp:(.text+0x1700): undefined reference to `gettimeofday(timeval*, int*)'
MPEG4MulticastReceiver.o:MPEG4MulticastReceiver.cpp:(.text+0x2042): undefined reference to `gettimeofday(timeval*, int*)'
MPEG4MulticastReceiver.o:MPEG4MulticastReceiver.cpp:(.text$_ZN8recorder10MyFileSinkC1ER16UsageEnvironmentP6_iobufjPKc[recorder::MyFileSink::MyFileSink(UsageEnvironment&, _iobuf*, unsigned int, char const*)]+0x62): undefined reference to `FileSink::FileSink(UsageEnvironment&, _iobuf*, unsigned int, char const*)'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x84): undefined reference to `_socket'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x25a): undefined reference to `_fcntl'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x273): undefined reference to `_fcntl'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x2b2): undefined reference to `_socket'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x444): undefined reference to `_select'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x45d): undefined reference to `___errno'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x467): undefined reference to `___errno'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x539): undefined reference to `_recvfrom'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x69d): undefined reference to `_sendto'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0x723): undefined reference to `_getsockopt'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0xaf2): undefined reference to `_getsockname'
/usr/local/live/groupsock/libgroupsock.a:GroupsockHelper.cpp:(.text+0xde5): undefined reference to `_gethostbyname'
/usr/local/live/groupsock/libgroupsock.a:inet.c:(.text+0x160d): undefined reference to `_inet_addr'
/usr/local/live/groupsock/libgroupsock.a:inet.c:(.text+0x1620): undefined reference to `_inet_ntoa'
/usr/local/live/groupsock/libgroupsock.a:inet.c:(.text+0x1633): undefined reference to `_gethostbyname'
/usr/local/live/groupsock/libgroupsock.a:inet.c:(.text+0x1640): undefined reference to `_random'
/usr/local/live/groupsock/libgroupsock.a:inet.c:(.text+0x1653): undefined reference to `_srandom'
/usr/local/live/liveMedia/libliveMedia.a:MP3StreamState.cpp:(.text+0x10acd): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:MP3StreamState.cpp:(.text+0x10e4c): undefined reference to `_select'
/usr/local/live/liveMedia/libliveMedia.a:MP3StreamState.cpp:(.text+0x10f23): undefined reference to `_recv'
/usr/local/live/liveMedia/libliveMedia.a:InputFile.cpp:(.text+0x1993e): undefined reference to `_fseeko'
/usr/local/live/liveMedia/libliveMedia.a:InputFile.cpp:(.text+0x1996b): undefined reference to `_ftello'
/usr/local/live/liveMedia/libliveMedia.a:HTTPSink.cpp:(.text+0x1b8ae): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:HTTPSink.cpp:(.text+0x1b99d): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTPInterface.cpp:(.text+0x29ecb): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTPInterface.cpp:(.text+0x29eef): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTPInterface.cpp:(.text+0x29f1f): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTPInterface.cpp:(.text+0x29f42): more undefined references to `_send' follow
/usr/local/live/liveMedia/libliveMedia.a:RTSPServer.cpp:(.text+0x2cbf3): undefined reference to `_getsockname'
/usr/local/live/liveMedia/libliveMedia.a:RTSPServer.cpp:(.text+0x2df24): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTSPServer.cpp:(.text+0x2ebbd): undefined reference to `_getsockname'
/usr/local/live/liveMedia/libliveMedia.a:RTSPOverHTTPServer.cpp:(.text+0x30cb9): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTSPClient.cpp:(.text+0x35cd4): undefined reference to `_send'
/usr/local/live/liveMedia/libliveMedia.a:RTSPClient.cpp:(.text+0x36d11): undefined reference to `_send'
/usr/local/live/BasicUsageEnvironment/libBasicUsageEnvironment.a:BasicUsageEnvironment.cpp:(.text+0x57f): undefined reference to `___errno'
/usr/local/live/BasicUsageEnvironment/libBasicUsageEnvironment.a:BasicTaskScheduler.cpp:(.text+0x176c): undefined reference to `_select'
/usr/local/live/BasicUsageEnvironment/libBasicUsageEnvironment.a:BasicTaskScheduler.cpp:(.text+0x1775): undefined reference to `___errno'
/usr/local/live/BasicUsageEnvironment/libBasicUsageEnvironment.a:BasicTaskScheduler.cpp:(.text+0x177f): undefined reference to `___errno'
collect2: ld returned 1 exit status
make: *** [RecordingController] Error 1


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


I don't know what I should link in addition to the allready linked libraries.
What do the warnings mean?
I hope that someone of you can help me.

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019