Subject: RE: Compiler
From: [email-masked] (Colin Peters)

28 Oct 1997 19:58:19 -0800
Message-ID: <01BCE455.79E90A40.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: "[email-masked]" <[email-masked]>
Cc: "[email-masked]" <[email-masked]>

>>From: "Scott Warner" <[email-masked]>
>>
>>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
-- [email-masked] - 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
"[email-masked]" with one line of text: "help".