mingw32 and CreateMappedBitmap

Mumit Khan khan@xraylith.wisc.edu
Fri Oct 1 00:00:00 GMT 1999


In article < 7pobbn$512$1@oak.prod.itd.earthlink.net >,
Patrick Block <panic@apexmail.com> wrote:
>
>Yes, I've done that. I also make a call to InitCommonControls(). I still get
>the same error message.
>
>
>Stuart Brown <stuart.brown@btinternet.com> wrote in message
> news: 37bf45d3.10180456@news.btinternet.com ...
>> On Sat, 21 Aug 1999 00:43:21 -0400, "Patrick Block"
>> <panic@apexmail.com> wrote:
>>
>> >I've had great success compiling windows applications with this compiler,
>> >but I just ran into a problem. I'm trying to use a function called
>> >CreateMappedBitmap, and I get this error:
>> >
>> >C:\WINDOWS\TEMP\cc5efYfb.o(.text+0xfe8):flash.c: undefined reference to
>> >`CreateMappedBitmap@20'
>>
>> >Anyone have any idea how to solve this problem?
>>
>> Have you tried linking your program with option -lcomctl32?


This should work even with egcs-1.1.2 even with the old headers and
import libraries (btw, you did update the import libraries when 
updating to the w32api package, right?).

However, since binutils linker is single pass, you may be running into
the problem where the libraries must come after code that references
symbols from these libraries. eg., the following won't work:
  
  $ gcc -lcommctl32 foo.c -mwindows

instead:

  $ gcc foo.c -lcommctl32 -mwindows

will.

If this is not the problem, it's impractical to try to guess without
a testcase.

Regards,
Mumit



More information about the Gcc-help mailing list