This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Compiler


>>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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]