Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Is this a known bug or am I dumb?

This thread is locked; no one can reply to it. rss feed Print
Is this a known bug or am I dumb?
me also
Member #7,731
September 2006

Finally reinstalled allegro, devcpp and all that put the -lalleg in its proper place, linked the liballeg.a to the project, did a full compile and...

boom, pretty big error that came out, all the while insisting that my

#include <allegro.h> line is the culprit, just when I thought the compiler and me could get along...

this is the error:

1Compiler: Default compiler
2Building Makefile: "C:\DevCpp\Programacion en C\cutrejuego(1)\Makefile.win"
3Executing make clean
4rm -f base.o codigoextra.o Proyecto1.exe
5 
6g++.exe -c base.cpp -o base.o -I"C:/DevCpp/include/c++" -I"C:/DevCpp/include/c++/mingw32" -I"C:/DevCpp/include/c++/backward" -I"C:/DevCpp/include"
7 
8In file included from C:/DevCpp/include/allegro.h:25,
9 from base.cpp:1:
10C:/DevCpp/include/allegro/base.h:85: type specifier omitted for parameter `
11 allegro_errno'
12C:/DevCpp/include/allegro/base.h:85: ISO C++ forbids declaration of `AL_VAR'
13 with no type
14 
15In file included from C:/DevCpp/include/allegro/system.h:23,
16 from C:/DevCpp/include/allegro.h:27,
17 from base.cpp:1:
18C:/DevCpp/include/allegro/unicode.h:34: type specifier omitted for parameter `
19 set_uformat'
20C:/DevCpp/include/allegro/unicode.h:34: parse error before `int'
21C:/DevCpp/include/allegro/unicode.h:34: ISO C++ forbids declaration of `AL_FUNC
22 ' with no type
23C:/DevCpp/include/allegro/unicode.h: In function `int AL_FUNC(...)':
24C:/DevCpp/include/allegro/unicode.h:35: type specifier omitted for parameter `
25 get_uformat'
26
27
28**********LOTS AND LOTS OF LINES (all similar to the ones above and below) Like 154 pages of size 14 letters*****
29
30 C:/DevCpp/include/allegro/system.h:95: type specifier omitted for parameter `
31 set_close_button_callback'
32C:/DevCpp/include/allegro/system.h:95: type specifier omitted for parameter `
33 proc'
34C:/DevCpp/include/allegro/system.h:95: parse error before `void'
35C:/DevCpp/include/allegro/system.h:95: type specifier omitted for parameter `
36Internal compiler error: Error reporting routines re-entered.
37Please submit a full bug report,
38with preprocessed source if appropriate.
39See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
40make.exe: *** [base.o] Error 1
41 
42Execution terminated

Any bright ideas why I get more than 150 pages of errors?

Richard Phipps
Member #1,632
November 2001
avatar

Quote:

g++.exe -c base.cpp -o base.o -I"C:/DevCpp/include/c++" -I"C:/DevCpp/include/c++/mingw32" -I"C:/DevCpp/include/c++/backward" -I"C:/DevCpp/include"

Where is your -lalleg call?

me also
Member #7,731
September 2006

Tools / compiler options / "add the folowing comands when calling compiler" box

Thats where I put it.

Neil Walker
Member #210
April 2000
avatar

Maybe that option doesn't work. Most things don't work properly in DevC++. Try adding it to usual place.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

me also
Member #7,731
September 2006

Whats the usual place ? I dont rember where I put it last time I installed ^^'
Pray tell

Peter Hull
Member #1,136
March 2001

This is a compiling error, not a linking error. Stop messing about and show us base.cpp please.

Pete

me also
Member #7,731
September 2006

Well, wish it were, but the code worked fine and smooth the very day before I formated my computer, afther formating I've reinstaled everything and now not only it doesnt work, but it gives this weird error, and I still ahvent touched the my code. But If you think I'd help, here it is:

1#include <allegro.h>
2#include "interfaz_clases.h"
3#include <time.h>
4 
5BITMAP *raton, *buffer, *del_mapa, *fondo_mapa, *el_muro, *la_caja, *mapa_pj, *dibu_bomba, *dibu_fuego;
6PALETTE palette;
7 
8void iniciartodo();
9void salir();
10bool done = false;
11 
12volatile int tiempo1 = 0;
13void ticker(void)
14{
15 tiempo1=1;
16}
17END_OF_FUNCTION(ticker)
18 
19void iniciartodo()
20{
21 allegro_init();
22 install_keyboard();
23 install_mouse();
24 set_color_depth(32);
25 set_gfx_mode(GFX_AUTODETECT, 1024, 768, 0, 0);
26
27 install_timer();
28 LOCK_FUNCTION(ticker);
29 LOCK_VARIABLE(tiempo1);
30 install_int_ex(ticker, BPS_TO_TIMER(15));
31
32
33 srand ( time(NULL) ); /* initialize random generator */
34
35 buffer = create_bitmap(SCREEN_W, SCREEN_H);
36 raton = create_bitmap(SCREEN_W, SCREEN_H);
37 clear(buffer);
38 clear_to_color(raton, makecol(255, 0, 255));
39
40 del_mapa = create_bitmap(map_w * tam_celda, map_h * tam_celda); //crea el bitmap del_mapa
41 clear_to_color(del_mapa, makecol(255, 0, 255)); // y lo limpia a transparente
42
43 mapa_pj = create_bitmap(map_w * tam_celda, map_h * tam_celda);
44 clear_to_color(mapa_pj, makecol(255, 0, 255));
45
46 fondo_mapa = create_bitmap(map_w-1 * tam_celda, map_h-1 * tam_celda); //Crea el bitmap del fondo del mapa
47 //clear_to_color(fondo_mapa, makecol(255, 0, 255)); //Porque no funciona el clear? da error de ejcucion
48 fondo_mapa = load_bitmap("imagenes/fondo.pcx", palette); //y carga la imagen del fondo
49
50 el_muro = create_bitmap(tam_celda,tam_celda);
51 clear_to_color(el_muro, makecol(255, 0, 255));
52 el_muro = load_bitmap("imagenes/muro.pcx", palette);
53
54 la_caja = create_bitmap(tam_celda,tam_celda);
55 clear_to_color(la_caja, makecol(255, 0, 255));
56 la_caja = load_bitmap("imagenes/caja.pcx", palette);
57
58 dibu_bomba = create_bitmap(tam_celda,tam_celda);
59 clear_to_color(dibu_bomba, makecol(255, 0, 255));
60 dibu_bomba = load_bitmap("imagenes/bomba.pcx", palette);
61
62
63 show_mouse(raton);
64
65}
66 
67 
68void salir() { if (key[KEY_ESC]) done = true;}
69 
70int main()
71{
72 iniciartodo();
73 mapa.crear_mapa();
74 player1.crear_pj();
75
76 while (!done)
77 {
78 clear(buffer);
79 player1.moverse();
80 player1.poner_bomba();
81
82 mapa.dibujar_mapa();
83 player1.dibujarse();
84 draw_sprite(buffer, raton,0,0);
85 blit(buffer, screen,0,0,0,0,SCREEN_W,SCREEN_H);
86
87 salir();
88 }
89
90 mapa.destruir_mapa();
91 destroy_bitmap(raton);
92 destroy_bitmap(buffer);
93 return 0;
94}
95END_OF_MAIN()

BAF
Member #2,981
December 2002
avatar

RP: He doesn't need -lalleg for that portion because he's not linking, just compiling to an object file.

Now, what is this base.h that allegro.h is including?

[edit]
It seems it thinks its a compiler bug?

Quote:

Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make.exe: *** [base.o] Error 1

:o

I got the same error one time compiling wxWidgets, and upgrading my gcc fixed it.

Go to: