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]

RE: Cygwin - linker errors - __assert, __itob and __ftol


C S wrote on 03 June 2008 14:25:

> Brian,
> 
>  i figured out that not only do i need to compile against the
> no-cygwin flag but also link to it as well. so i tried to add the -Wl
> option like this:
> 
> g++ -mno-cygwin -D__int64="long long" -W1-mno-cygwin 

  Ah, there's your problem.  You typed a '1' instead of an 'l'.  And you
forgot the comma.

  No, wait a minute, I was wrong.  The actual problem is that you aren't
correctly describing what you've done.  Cut and paste stuff from your shell
into your email, don't just make it up or you'll inevitably get it wrong.

  Fortunately I can still tell what the actual error is:

> the error i get now is:
> 
> /usr/lib/gcc/i686-pc-mingw32/3.4.4../../../../i686-pc-mingw32/bin/ld:
> unrecognized emulation mode: no-cygwin
> Supported Emulations: i386pe
> collect2: ld returned exit status
> 
> at the prompt i did a ls /lib/gcc/i686-pc-mingw32 and it returned
> 3.4.4 so that seems right.
> 
> any clues or suggestions?? thanks all in advance!

  It's not a linker option in that sense; you just need to make sure you've
passed it to gcc or g++ along with all the .o files and it knows how to
drive the linker from that.  So just remove your -Wl altogether; the plain
old "-mno-cygwin" that you have immediately after the "g++" will do the job.
The effect it has is to cause g++.exe to pass different -L options to ld.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
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]