Thread overview
GetStockObject problem
Dec 08, 2003
murban
Dec 08, 2003
Jan Knepper
Dec 08, 2003
murban
December 08, 2003
Hi all,

I'm having a problem with GetStockObject under Digital Mars, as well as minGW32.

The following works fine in Visual C++:

wmainclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);

But when I try to compile this ins Digital Mars or minGW32, I get the following linker error:

Error 42: Symbol Undefined: _GetStockObject@4

AFAIK, GetStockObject is a standard Win API call, so I don't see why this isn't working. Can anyone give me a hand?

Thanks!



December 08, 2003
Include GDI32.lib into you project's link phase...


murban@cbs.umn.edu wrote:
> Hi all,
> 
> I'm having a problem with GetStockObject under Digital Mars, as well as minGW32.
> 
> The following works fine in Visual C++:
> 
> wmainclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
> 
> But when I try to compile this ins Digital Mars or minGW32, I get the following
> linker error:
> 
> Error 42: Symbol Undefined: _GetStockObject@4
> 
> AFAIK, GetStockObject is a standard Win API call, so I don't see why this
> isn't working. Can anyone give me a hand?
> 
> Thanks!
> 
> 
> 


-- 
ManiaC++
Jan Knepper

December 08, 2003
Oh yeah...

That worked. Thanks. :)

In article <br288p$1uer$1@digitaldaemon.com>, Jan Knepper says...
>
>Include GDI32.lib into you project's link phase...
>
>
>murban@cbs.umn.edu wrote:
>> Hi all,
>> 
>> I'm having a problem with GetStockObject under Digital Mars, as well as minGW32.
>> 
>> The following works fine in Visual C++:
>> 
>> wmainclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
>> 
>> But when I try to compile this ins Digital Mars or minGW32, I get the following linker error:
>> 
>> Error 42: Symbol Undefined: _GetStockObject@4
>> 
>> AFAIK, GetStockObject is a standard Win API call, so I don't see why this isn't working. Can anyone give me a hand?
>> 
>> Thanks!
>> 
>> 
>> 
>
>
>-- 
>ManiaC++
>Jan Knepper
>