This is the mail archive of the cygwin@sourceware.cygnus.com 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]

troubles with gnuwin32-egcs-971023...


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.moar@mchp.siemens.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@cygnus.com" with one line of text: "help".


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