Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Originating-IP: [210.18.2.242]
From: "Ajay Neti" <ajaykumarn@hotmail.com>
To: cygwin@cygwin.com
Cc: ajaykumarn@infy.com
Subject: Cannot compile using gcc (GetModuleHandleA error)
Date: Mon, 07 May 2001 15:40:16 
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <F46z37cfJiY9ZNMjiGw00004903@hotmail.com>
X-OriginalArrivalTime: 07 May 2001 15:40:16.0375 (UTC) FILETIME=[0371E870:01C0D70C]

Hi,

I have extracted the gcc zip file from cygwin site, and I am
trying to compile the following C file on Windows 98 :-

int main(int argc, char** argv) {
      int a= 3+2;
	return 0;
}

The compiler command I give and the error I get are :-

D:\dev>gcc -I D:\Cygnus\usr\include -L C:\Windows\System hello.c
/cygdrive/d/CYGNUS/USR/BIN/../lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0xe6)
:_cygwin_crt0_common.cc: undefined reference to `GetModuleHandleA@4'
collect2: ld returned 1 exit status

Any ideas on how to fix this?
I saw some of the archived messages on this mail list, and I
tried to link to various *32 libraries as indicated there, but I
always ended up with the same error.

Thanks a bunch,
Ajay

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

