| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <3B99C65F.66376A7E@iee.org> |
| Date: | Sat, 08 Sep 2001 08:18:55 +0100 |
| From: | Don Sharp <dwsharp AT iee DOT org> |
| X-Mailer: | Mozilla 4.78 [en] (WinNT; U) |
| X-Accept-Language: | en |
| MIME-Version: | 1.0 |
| To: | Norman Frederick <normanf AT qualcomm DOT com> |
| CC: | gnuwin32 <cygwin AT cygwin DOT com> |
| Subject: | Re: problems linking |
| References: | <4 DOT 3 DOT 2 DOT 7 DOT 2 DOT 20010907161012 DOT 00bada60 AT adept DOT qualcomm DOT com> |
Norman Frederick wrote: > > Dear Sirs: > > I am having problems linking modules compiled using your gcc. > > example: > > gcc -c simple.c > try just gcc simple.c gcc constructs the necessary list of extra files that MUST be included in the link. > ld simple.o crt0.o -lm -lc > get error: > /usr/lib/libm.a<_cygwin_crt0_common.o>undefined reference to GETModuleHandleA AT 4 > > What is missing? > IMHO one should NEVER use ld directly unless you know PRECISELY what you are doing. I hate to think of the number of times that I have run foul of this problem because of different underlying system behaviour. > I have also tried > > ld simple.o -lm -lc crt0.o gcrt > but get a bunch of undefined references. > > Thanks, > Norman > Cheers Don Sharp -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |