Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro, MinGW32, BITMAP, and <string>

This thread is locked; no one can reply to it. rss feed Print
Allegro, MinGW32, BITMAP, and <string>
Goodbytes
Member #448
June 2000
avatar

Here's this situation.

MinGW32 with GCC 3.2 includes Windows headers when you #include <string> or one of many other fine stream-based C++ headers. Aside from this being absolutely stupid, it causes a compiler error because BITMAP is declared twice when you include <string> and <allegro.h> in the same program.

Now then. According to the 4.1.2 changelog, this has been fixed in the new Allegro release... but I still get the same compiler errors! Bleh! Bleh, I say!

So, if this fix has indeed been included with 4.1.2, why doesn't it work? Do I need to #include <winalleg.h> or something?

I already tried re-arranging the order of #inclusion... I think.

P.S.: allegro.txt is 399 KB. Holy carp! Last time I checked, it was much smaller... I think. Heh.


--
~Goodbytes

Bob
Free Market Evangelist
September 2000
avatar

I remailed the conductors list.

There's no good solution to this, really. I'll post something up on the Mingw bug list, but otherwise, there's not much Allegro can do...

--
- Bob
[ -- All my signature links are 404 -- ]

Goodbytes
Member #448
June 2000
avatar

Okay. Thanks for doing all the e-mailing and such, Bob!


--
~Goodbytes

Bob
Free Market Evangelist
September 2000
avatar

You need to compile with -D__GTHREAD_HIDE_WIN32API.

g++ -D__GTHREAD_HIDE_WIN32API test.cpp -o test.exe -lalleg

It's a workaround for Mingw.

The SourceForge Bug entry is here

--
- Bob
[ -- All my signature links are 404 -- ]

Goodbytes
Member #448
June 2000
avatar

Thanks, Bob.


--
~Goodbytes

Mars
Member #971
February 2001
avatar

I had already mentioned this problem to the MinGW user mailing list some time ago several times. They were all very kind and helpful, but the patches I received didn't solve the problem.:-/ Nice to hear there now is a work-around.:)

--
This posting is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Bob
Free Market Evangelist
September 2000
avatar

bump

--
- Bob
[ -- All my signature links are 404 -- ]

Go to: