X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: "'cygwin'" <cygwin@cygwin.com>
References: <4ae9b89d0805301549i5ee30654l5f6335544ea38780@mail.gmail.com> 	 <484135CE.30E20C20@dessent.net> <4ae9b89d0806030624m6e9ae9f4u69a7d613fd8ab621@mail.gmail.com>
Subject: RE: Cygwin - linker errors - __assert, __itob and __ftol
Date: Tue, 3 Jun 2008 14:33:37 +0100
Message-ID: <02d501c8c57e$6da1f1a0$2708a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <4ae9b89d0806030624m6e9ae9f4u69a7d613fd8ab621@mail.gmail.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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/

