delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/24/14:59:21

From: christoph DOT moar AT mchp DOT siemens DOT de (Christoph Moar)
Subject: troubles with gnuwin32-egcs-971023...
24 Feb 1998 14:59:21 -0800 :
Message-ID: <3.0.3.32.19980224102134.00917210.cygnus.gnu-win32@mail-o.mchp.siemens.de>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Sorry if this is a faq, I really did check the archives (well,
most of them, at least) but could not find a useful hint:

gnuwin32-b18 works fine for me, I would like to use some of 
the features of egcs (which I am extensively using on linux
anyway) on nt.

So I downloaded gnuwin32-egcs-971023, set the paths and
started compiling some easy programs.

When I do the linking, I got the following:

C:\test>gcc -g -o iprecv IpRecv.o Application.o -lstdc++
IpRecv.o: In function `main':
/test/IpRecv.cc:122: undefined reference to `htons(unsigned short)'
/test/IpRecv.cc:127: undefined reference to `htonl(unsigned long)'
/test/IpRecv.cc:128: undefined reference to `htons(unsigned short)'
/test/IpRecv.cc:131: undefined reference to `ntohl(unsigned long)'
/test/IpRecv.cc:131: undefined reference to `ntohl(unsigned long)'
/test/IpRecv.cc:145: undefined reference to `htonl(unsigned long)'
gcc: Internal compiler error: program ld got fatal signal 1

so I looked for where the htonl routines are defined and to me
that happens in libcygwin32.a, if I'm not completely wrong.
I figured libcygwin32.a would be included automatically (in
fact, with the cygwin32-b18 I never put that on the link line),
but I figured I'd add it just to make sure:

C:\test>gcc -g -o iprecv IpRecv.o Application.o -lcygwin -lstdc++
//c/gnuwin32-egcs-971023/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32\egcs-2.90
..14/
libgcc.a(tinfo.o): In function `_rtti_si':
/homes/src/cdk/CYGWIN32-2/gcc/../../gcc/cp/tinfo.cc(.text+0x50): multiple
defini
tion of `__rtti_si'
//c/gnuwin32-egcs-971023/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(ds53.
o)(.
text+0x0): first defined here
//c/gnuwin32-egcs-971023/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32\egcs-2.90
..14/
libgcc.a(tinfo.o): In function `_rtti_user':
/homes/src/cdk/CYGWIN32-2/gcc/../../gcc/cp/tinfo.cc(.text+0x74): multiple
defini
tion of `__rtti_user'
//c/gnuwin32-egcs-971023/H-i386-cygwin32/i386-cygwin32/lib/libcygwin.a(ds54.
o)(.
text+0x0): first defined here
IpRecv.o: In function `main':
/test/IpRecv.cc:122: undefined reference to `htons(unsigned short)'
/test/IpRecv.cc:127: undefined reference to `htonl(unsigned long)'
/test/IpRecv.cc:128: undefined reference to `htons(unsigned short)'
/test/IpRecv.cc:131: undefined reference to `ntohl(unsigned long)'
/test/IpRecv.cc:131: undefined reference to `ntohl(unsigned long)'
/test/IpRecv.cc:145: undefined reference to `htonl(unsigned long)'
gcc: Internal compiler error: program ld got fatal signal 1

well well, it wasn't too smart from me, was it?

Anybody a hint what I am doing wrong?

Thanks a lot and best regards,

Christoph.




--
Christoph Moar (christoph DOT moar AT mchp DOT siemens DOT de)  Tel. (++49) 89 636-44628
SIEMENS AG Corporate Technology                  Fax. (++49) 89 636-47457
Information and Media Technology
Office Adress:  SIEMENS AG  ZT IK 1,  Otto-Hahn-Ring  6,  D-81739  Munich
Postal Adress:  SIEMENS AG  ZT IK 1,  D-81730 Munich
***   PGP PUBLIC KEY AVAILABLE ON REQUEST & ON KEY SERVERS WORLDWIDE  ***
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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