This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Compiler
- To: "swarnerx3 at acadia dot net" <swarnerx3 at acadia dot net>
- Subject: RE: Compiler
- From: Colin Peters <colin at bird dot fu dot is dot saga-u dot ac dot jp>
- Date: Wed, 29 Oct 1997 10:29:01 +0900
- Cc: "gnu-win32 at cygnus dot com" <gnu-win32 at cygnus dot com>
>>From: "Scott Warner" <swarnerx3@acadia.net>
>>
>>Having trouble compiling Win32 programs. Keep getting "undefined
>>reference" errors. Is there a SET missing so the compiler can find the
>>libs?
Probably the problem is that you are not actually telling it what libraries
to look for. You have to explicitly link in any Win32 API libraries you
need functions from (except for kernel32, which you should never explicitly
link). Try adding -luser32 and -lgdi32 to your link command line and I
think many of your undefined references will go away.
Colin.
-- Colin Peters - Saga Univ. Dept. of Information Science
-- colin@bird.fu.is.saga-u.ac.jp - finger for PGP public key
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".