From: BYJ02057@nifty.ne.jp
Subject: Re: undefined reference to `GetStockObject@4
22 Mar 1998 13:49:32 -0800
Message-ID: <199803200620.PAA27322.cygnus.gnu-win32@forum.mix.or.jp>
To: gnu-win32@cygnus.com
Cc: thedagit@mail.coos.or.us


    Add -lgdi32 to the command line. GetSotckOjbect is exported from
GDI32.DLL.

Regards.

Tomohiko Abe
BYJ02057@nifty.nejp
-

>Hello,
>
>I'm a still a newbie and I'm still having troubles.  Could someone help
>me figure out why gcc can't find GetStockObject on my configuration? 
>The command line I use is:
>gcc -ofoo.exe foo.c -lkernel32 -luser32 -Wl,--subsystem,windows 
>
>My guess is that I'm not linking a lib that I should be.  Or else, one
>of my header files or libs is missing the definition of GetStockObject,
>but that seems less likely.
>
>The line in my code that called GetStockObject is:
>wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
>
>Thank you,
>Jaso


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
