Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Upgraded Allegro = Compiling Error

This thread is locked; no one can reply to it. rss feed Print
Upgraded Allegro = Compiling Error
JaTeR
Member #2,088
March 2002
avatar

ok, not long ago my compiler went all wacky on me.. so I deleted the MinGW32 directory and after reinstalling it still didn't work.. so I deleted it again, and then deleted the Allegro directory..

after installing the latest builds of both, I went to compile a program (ZPong) and got this:

#SelectExpand
1c:/derek/cpp/mingw/include/allegro/gfx.h:143: using typedef-name `BITMAP' after 2 3 `struct' 4c:/derek/cpp/mingw/include/allegro/gfx.h:144: using typedef-name `BITMAP' after 5 6 `struct' 7c:/derek/cpp/mingw/include/allegro/gfx.h:145: using typedef-name `BITMAP' after 8 9 `struct' 10c:/derek/cpp/mingw/include/allegro/gfx.h:146: using typedef-name `BITMAP' after 11 12 `struct' 13c:/derek/cpp/mingw/include/allegro/gfx.h:147: using typedef-name `BITMAP' after 14 15 `struct' 16c:/derek/cpp/mingw/include/allegro/gfx.h:148: using typedef-name `BITMAP' after 17 18 `struct' 19c:/derek/cpp/mingw/include/allegro/gfx.h:148: using typedef-name `BITMAP' after 20 21 `struct' 22c:/derek/cpp/mingw/include/allegro/gfx.h:149: using typedef-name `BITMAP' after 23 24 `struct' 25c:/derek/cpp/mingw/include/allegro/gfx.h:149: using typedef-name `BITMAP' after 26 27 `struct' 28c:/derek/cpp/mingw/include/allegro/gfx.h:150: using typedef-name `BITMAP' after 29 30 `struct' 31c:/derek/cpp/mingw/include/allegro/gfx.h:150: using typedef-name `BITMAP' after 32 33 `struct' 34c:/derek/cpp/mingw/include/allegro/gfx.h:151: using typedef-name `BITMAP' after 35 36 `struct' 37c:/derek/cpp/mingw/include/allegro/gfx.h:151: using typedef-name `BITMAP' after 38 39 `struct' 40c:/derek/cpp/mingw/include/allegro/gfx.h:152: using typedef-name `BITMAP' after 41 42 `struct' 43c:/derek/cpp/mingw/include/allegro/gfx.h:152: using typedef-name `BITMAP' after 44 45 `struct' 46c:/derek/cpp/mingw/include/allegro/gfx.h:153: using typedef-name `BITMAP' after 47 48 `struct' 49c:/derek/cpp/mingw/include/allegro/gfx.h:153: using typedef-name `BITMAP' after 50 51 `struct' 52c:/derek/cpp/mingw/include/allegro/gfx.h:154: using typedef-name `BITMAP' after 53 54 `struct' 55c:/derek/cpp/mingw/include/allegro/gfx.h:154: using typedef-name `BITMAP' after 56 57 `struct' 58c:/derek/cpp/mingw/include/allegro/gfx.h:155: using typedef-name `BITMAP' after 59 60 `struct' 61c:/derek/cpp/mingw/include/allegro/gfx.h:155: using typedef-name `BITMAP' after 62 63 `struct' 64c:/derek/cpp/mingw/include/allegro/gfx.h:156: using typedef-name `BITMAP' after 65 66 `struct' 67c:/derek/cpp/mingw/include/allegro/gfx.h:157: using typedef-name `BITMAP' after 68 69 `struct' 70c:/derek/cpp/mingw/include/allegro/gfx.h:158: using typedef-name `BITMAP' after 71 72 `struct' 73c:/derek/cpp/mingw/include/allegro/gfx.h:159: using typedef-name `BITMAP' after 74 75 `struct' 76c:/derek/cpp/mingw/include/allegro/gfx.h:160: using typedef-name `BITMAP' after 77 78 `struct' 79c:/derek/cpp/mingw/include/allegro/gfx.h:160: using typedef-name `BITMAP' after 80 81 `struct' 82c:/derek/cpp/mingw/include/allegro/gfx.h:161: using typedef-name `BITMAP' after 83 84 `struct' 85c:/derek/cpp/mingw/include/allegro/gfx.h:162: using typedef-name `BITMAP' after 86 87 `struct' 88c:/derek/cpp/mingw/include/allegro/gfx.h:162: using typedef-name `BITMAP' after 89 90 `struct' 91c:/derek/cpp/mingw/include/allegro/gfx.h:163: using typedef-name `BITMAP' after 92 93 `struct' 94c:/derek/cpp/mingw/include/allegro/gfx.h:163: using typedef-name `BITMAP' after 95 96 `struct' 97c:/derek/cpp/mingw/include/allegro/gfx.h:164: using typedef-name `BITMAP' after 98 99 `struct' 100c:/derek/cpp/mingw/include/allegro/gfx.h:164: using typedef-name `BITMAP' after 101 102 `struct' 103c:/derek/cpp/mingw/include/allegro/gfx.h:165: using typedef-name `BITMAP' after 104 105 `struct' 106c:/derek/cpp/mingw/include/allegro/gfx.h:165: using typedef-name `BITMAP' after 107 108 `struct' 109c:/derek/cpp/mingw/include/allegro/gfx.h:166: using typedef-name `BITMAP' after 110 111 `struct' 112c:/derek/cpp/mingw/include/allegro/gfx.h:166: using typedef-name `BITMAP' after 113 114 `struct' 115c:/derek/cpp/mingw/include/allegro/gfx.h:167: using typedef-name `BITMAP' after 116 117 `struct' 118c:/derek/cpp/mingw/include/allegro/gfx.h:167: using typedef-name `BITMAP' after 119 120 `struct' 121c:/derek/cpp/mingw/include/allegro/gfx.h:168: using typedef-name `BITMAP' after 122 123 `struct' 124c:/derek/cpp/mingw/include/allegro/gfx.h:168: using typedef-name `BITMAP' after 125 126 `struct' 127c:/derek/cpp/mingw/include/allegro/gfx.h:169: using typedef-name `BITMAP' after 128 129 `struct' 130c:/derek/cpp/mingw/include/allegro/gfx.h:169: using typedef-name `BITMAP' after 131 132 `struct' 133c:/derek/cpp/mingw/include/allegro/gfx.h:170: using typedef-name `BITMAP' after 134 135 `struct' 136c:/derek/cpp/mingw/include/allegro/gfx.h:170: using typedef-name `BITMAP' after 137 138 `struct' 139c:/derek/cpp/mingw/include/allegro/gfx.h:171: using typedef-name `BITMAP' after 140 141 `struct' 142c:/derek/cpp/mingw/include/allegro/gfx.h:172: using typedef-name `BITMAP' after 143 144 `struct' 145c:/derek/cpp/mingw/include/allegro/gfx.h:172: using typedef-name `BITMAP' after 146 147 `struct' 148c:/derek/cpp/mingw/include/allegro/gfx.h:234: conflicting types for `typedef 149 struct BITMAP BITMAP' 150c:/derek/cpp/mingw/include/wingdi.h:1183: previous declaration as `typedef 151 struct tagBITMAP BITMAP' 152In file included from c:/derek/cpp/mingw/include/allegro/gfx.h:384, 153 from c:/derek/cpp/mingw/include/allegro.h:42, 154 from main.cpp:5: 155c:/derek/cpp/mingw/include/allegro/inline/gfx.inl: In function `void 156 clear_to_color(BITMAP*, int)': 157c:/derek/cpp/mingw/include/allegro/inline/gfx.inl:93: cannot convert `BITMAP*' 158 to `tagBITMAP*' in argument passing 159c:/derek/cpp/mingw/include/allegro/inline/gfx.inl: In function `void 160 acquire_bitmap(BITMAP*)': 161c:/derek/cpp/mingw/include/allegro/inline/gfx.inl:202: cannot convert `BITMAP*' 162 163 to `tagBITMAP*' in argument passing 164c:/derek/cpp/mingw/include/allegro/inline/gfx.inl: In function `void 165 release_bitmap(BITMAP*)': 166c:/derek/cpp/mingw/include/allegro/inline/gfx.inl:211: cannot convert `BITMAP*' 167 168 to `tagBITMAP*' in argument passing 169In file included from c:/derek/cpp/mingw/include/allegro/draw.h:62, 170 from c:/derek/cpp/mingw/include/allegro.h:44, 171 from main.cpp:5: 172c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `int 173 getpixel(BITMAP*, int, int)': 174c:/derek/cpp/mingw/include/allegro/inline/draw.inl:35: cannot convert `BITMAP*' 175 176 to `tagBITMAP*' in argument passing 177c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 178 putpixel(BITMAP*, int, int, int)': 179c:/derek/cpp/mingw/include/allegro/inline/draw.inl:43: cannot convert `BITMAP*' 180 181 to `tagBITMAP*' in argument passing 182c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 183 vline(BITMAP*, int, int, int, int)': 184c:/derek/cpp/mingw/include/allegro/inline/draw.inl:51: cannot convert `BITMAP*' 185 186 to `tagBITMAP*' in argument passing 187c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 188 hline(BITMAP*, int, int, int, int)': 189c:/derek/cpp/mingw/include/allegro/inline/draw.inl:59: cannot convert `BITMAP*' 190 191 to `tagBITMAP*' in argument passing 192c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 193 line(BITMAP*, int, int, int, int, int)': 194c:/derek/cpp/mingw/include/allegro/inline/draw.inl:67: cannot convert `BITMAP*' 195 196 to `tagBITMAP*' in argument passing 197c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 198 rectfill(BITMAP*, int, int, int, int, int)': 199c:/derek/cpp/mingw/include/allegro/inline/draw.inl:75: cannot convert `BITMAP*' 200 201 to `tagBITMAP*' in argument passing 202c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 203 draw_sprite(BITMAP*, BITMAP*, int, int)': 204c:/derek/cpp/mingw/include/allegro/inline/draw.inl:90: cannot convert `BITMAP*' 205 206 to `tagBITMAP*' in argument passing 207c:/derek/cpp/mingw/include/allegro/inline/draw.inl:90: cannot convert `BITMAP*' 208 209 to `tagBITMAP*' in argument passing 210c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 211 draw_sprite_v_flip(BITMAP*, BITMAP*, int, int)': 212c:/derek/cpp/mingw/include/allegro/inline/draw.inl:99: cannot convert `BITMAP*' 213 214 to `tagBITMAP*' in argument passing 215c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 216 draw_sprite_h_flip(BITMAP*, BITMAP*, int, int)': 217c:/derek/cpp/mingw/include/allegro/inline/draw.inl:108: cannot convert `BITMAP* 218 ' to `tagBITMAP*' in argument passing 219c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 220 draw_sprite_vh_flip(BITMAP*, BITMAP*, int, int)': 221c:/derek/cpp/mingw/include/allegro/inline/draw.inl:118: cannot convert `BITMAP* 222 ' to `tagBITMAP*' in argument passing 223c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 224 draw_trans_sprite(BITMAP*, BITMAP*, int, int)': 225c:/derek/cpp/mingw/include/allegro/inline/draw.inl:136: cannot convert `BITMAP* 226 ' to `tagBITMAP*' in argument passing 227c:/derek/cpp/mingw/include/allegro/inline/draw.inl:136: cannot convert `BITMAP* 228 ' to `tagBITMAP*' in argument passing 229c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 230 draw_lit_sprite(BITMAP*, BITMAP*, int, int, int)': 231c:/derek/cpp/mingw/include/allegro/inline/draw.inl:146: cannot convert `BITMAP* 232 ' to `tagBITMAP*' in argument passing 233c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 234 draw_character(BITMAP*, BITMAP*, int, int, int)': 235c:/derek/cpp/mingw/include/allegro/inline/draw.inl:156: cannot convert `BITMAP* 236 ' to `tagBITMAP*' in argument passing 237c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 238 rotate_sprite(BITMAP*, BITMAP*, int, int, long int)': 239c:/derek/cpp/mingw/include/allegro/inline/draw.inl:168: cannot convert `BITMAP* 240 ' to `tagBITMAP*' in argument passing 241c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 242 rotate_sprite_v_flip(BITMAP*, BITMAP*, int, int, long int)': 243c:/derek/cpp/mingw/include/allegro/inline/draw.inl:180: cannot convert `BITMAP* 244 ' to `tagBITMAP*' in argument passing 245c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 246 rotate_scaled_sprite(BITMAP*, BITMAP*, int, int, long int, long int)': 247c:/derek/cpp/mingw/include/allegro/inline/draw.inl:192: cannot convert `BITMAP* 248 ' to `tagBITMAP*' in argument passing 249c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 250 rotate_scaled_sprite_v_flip(BITMAP*, BITMAP*, int, int, long int, long 251 int)': 252c:/derek/cpp/mingw/include/allegro/inline/draw.inl:204: cannot convert `BITMAP* 253 ' to `tagBITMAP*' in argument passing 254c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 255 pivot_sprite(BITMAP*, BITMAP*, int, int, int, int, long int)': 256c:/derek/cpp/mingw/include/allegro/inline/draw.inl:213: cannot convert `BITMAP* 257 ' to `tagBITMAP*' in argument passing 258c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 259 pivot_sprite_v_flip(BITMAP*, BITMAP*, int, int, int, int, long int)': 260c:/derek/cpp/mingw/include/allegro/inline/draw.inl:222: cannot convert `BITMAP* 261 ' to `tagBITMAP*' in argument passing 262c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 263 pivot_scaled_sprite(BITMAP*, BITMAP*, int, int, int, int, long int, long 264 int)': 265c:/derek/cpp/mingw/include/allegro/inline/draw.inl:231: cannot convert `BITMAP* 266 ' to `tagBITMAP*' in argument passing 267c:/derek/cpp/mingw/include/allegro/inline/draw.inl: In function `void 268 pivot_scaled_sprite_v_flip(BITMAP*, BITMAP*, int, int, int, int, long int, 269 long int)': 270c:/derek/cpp/mingw/include/allegro/inline/draw.inl:240: cannot convert `BITMAP* 271 ' to `tagBITMAP*' in argument passing 272In file included from c:/derek/cpp/mingw/include/allegro/rle.h:41, 273 from c:/derek/cpp/mingw/include/allegro.h:45, 274 from main.cpp:5: 275c:/derek/cpp/mingw/include/allegro/inline/rle.inl: In function `void 276 draw_rle_sprite(BITMAP*, const RLE_SPRITE*, int, int)': 277c:/derek/cpp/mingw/include/allegro/inline/rle.inl:36: cannot convert `BITMAP*' 278 to `tagBITMAP*' in argument passing 279c:/derek/cpp/mingw/include/allegro/inline/rle.inl: In function `void 280 draw_trans_rle_sprite(BITMAP*, const RLE_SPRITE*, int, int)': 281c:/derek/cpp/mingw/include/allegro/inline/rle.inl:52: cannot convert `BITMAP*' 282 to `tagBITMAP*' in argument passing 283c:/derek/cpp/mingw/include/allegro/inline/rle.inl:52: cannot convert `BITMAP*' 284 to `tagBITMAP*' in argument passing 285c:/derek/cpp/mingw/include/allegro/inline/rle.inl: In function `void 286 draw_lit_rle_sprite(BITMAP*, const RLE_SPRITE*, int, int, int)': 287c:/derek/cpp/mingw/include/allegro/inline/rle.inl:62: cannot convert `BITMAP*' 288 to `tagBITMAP*' in argument passing 289In file included from c:/derek/cpp/mingw/include/allegro.h:72, 290 from main.cpp:5: 291c:/derek/cpp/mingw/include/allegro/platform/alwin.h: At global scope: 292c:/derek/cpp/mingw/include/allegro/platform/alwin.h:41: declaration of C 293 function `int WinMain(void*, void*, char*, int)' conflicts with 294c:/derek/cpp/mingw/include/winbase.h:931: previous declaration `int 295 WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)' here 296main.cpp:746:16: warning: no newline at end of file 297mingw32-make: *** [zPong.exe] Error 1

now, when I compile a program that I just wrote that blits a nice little circle to the screen.. it works wonderfully..

am I going to have to code ZPong again?
if so.. it will be better and bug free.. (not that anyone cares) ;D
but.. the code would be very similar.. the drawing code would be exactly the same.. why doesn't it work? :'(

should I compile it against the debug version of Allegro? (oh yeah, thats the first step isn't it.. whoops)

thanks for any help that I get. :-*

JaTeR

--
Still spreading that sunshine!
for those that like informative profiles...

Trezker
Member #1,739
December 2001
avatar

[url http://www.allegro.cc/mockup.html]

Use codebox please :)

spellcaster
Member #1,493
September 2001
avatar

You could try to show us parts of the code causing the problems.
Then we could have a look at it.

Seems like your includes are messed up in your pong... I guess you're doing something strange there, if a "normal" program works fine.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Bob
Free Market Evangelist
September 2000
avatar

If you are including windows.h, you should include winalleg.h instead. If you are using Mingw 2.0.0, then you consult the FAQ. It's an issue with Mingw which will be resolved on the next release of Mingw. The FAQ states a temporary workaround for the problem.

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

JaTeR
Member #2,088
March 2002
avatar

tresker: erm.. I did.

bob: hmm.. no windows.h ... ahh yes! MinGW 2 is what i'm using... /me consults FAQ..

Quote:

If your program only includes header files of the C++ standard library, you're very likely trying to compile it with gcc 3.x for Mingw32; if so, define the symbol __GTHREAD_HIDE_WIN32API on the compiler command line:

g++ -D__GTHREAD_HIDE_WIN32API program.cpp -lalleg

erm. question! am I supposed to run this every time I compile? do I add "-D__GTHREAD_HIDE_WIN32API" to my makefile?

/me goes to try..

sc: will post codey stuff if Bob's solution doesn't work (highly doubtful. ;D)

Thank You All For You Help! :-*

[edit]
ok, got it working by add "-D__GTHREAD_HIDE_WIN32API"
to the makefile
thanks Bob! /me pledges to read the FAQ before asking any more questions. ;D

JaTeR

--
Still spreading that sunshine!
for those that like informative profiles...

Go to: