Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <006201c10306$5d54a500$520010ac@cirec.com> From: "Pierre Loic Herve" To: "cygwin" Subject: gcc howto Date: Mon, 2 Jul 2001 16:50:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 02 Jul 2001 14:47:06.0750 (UTC) FILETIME=[DD69C1E0:01C10305] Hi all ! I have been to the the FAQ and to Google but i could not find an answer I have in //c/pierre/src/test int main(int toto , char ** tata) { return 0; } I go //c/pierre/src/test> gcc -c main.c Thats OK //c/pierre/src/test> ls main.c main.o Then I go //c/pierre/src/test> gcc main.o /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-4/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32 collect2: ld returned 1 exit status So i try : //c/pierre/src/test> gcc -v -L//c/WINDOWS/SYSTEM main.o Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-4/specs gcc version 2.95.3-4 (cygwin special) /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-4/collect2.exe -Bdynamic --dll-search -prefix=cyg /usr/lib/crt0.o -L//c/WINDOWS/SYSTEM -L/usr/local/lib -L/usr/lib -L/usr/lib/ gcc-lib/i686-pc-cygwin/2.95.3-4 main.o -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0xe6):_cygwin_crt0_common. cc: undefined reference to `GetModuleHandleA AT 4' collect2: ld returned 1 exit status What's wrong with my gcc ? Thanks -- Pierre Loic Herve [http://pierloic.free.fr] [ICQ pierloic #118135943] -- 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/