• Viernes 15 de Noviembre de 2024, 10:21

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Mensajes - jagc1969

Páginas: [1]
1
Allegro / Instalación De Allegro En Dev-cpp
« en: Domingo 1 de Junio de 2008, 01:00 »
Hola a todos:

Estoy volviéndome loco con Allegro.

He instalado el Dev-Cpp v. 4.9.8.0  Funciona sin problemas. Puedo compilar programas .c y .cpp sin inconvenientes.

He instalado la versión 4.1.9 de Allegro sin ningún problema. Hasta el make install ha terminado con un mensaje indicando que la librería había sido correctamente instalada para MinGW32.

He puesto la opción -lalleg para el compilador y el linkador.

No hay forma de compilar un programa tan chorra como este ...

/*
 *    Example program for the Allegro library, by Shawn Hargreaves.
 *
 *    This is a very simple program showing how to get into graphics
 *    mode and draw text onto the screen.
 */


#include <allegro.h>



int main(void)
{
   /* you should always do this at the start of Allegro programs */
   if (allegro_init() != 0)
      return 1;

   /* set up the keyboard handler */
   install_keyboard();

   /* set a graphics mode sized 320x200 */
   if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) != 0) {
      if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) != 0) {
    set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
    allegro_message("Unable to set any graphic mode\n%s\n", allegro_error);
    return 1;
      }
   }

   /* set the color palette */
   set_palette(desktop_palette);

   /* clear the screen to white */
   clear_to_color(screen, makecol(255, 255, 255));

   /* you don't need to do this, but on some platforms (eg. Windows) things
    * will be drawn more quickly if you always acquire the screen before
    * trying to draw onto it.
    */
   acquire_screen();

   /* write some text to the screen with black letters and transparent background */
   textout_centre_ex(screen, font, "Hello, world!", SCREEN_W/2, SCREEN_H/2, makecol(0,0,0), -1);

   /* you must always release bitmaps before calling any input functions */
   release_screen();

   /* wait for a key press */
   readkey();

   return 0;
}

END_OF_MAIN()

Como veis, es de los ejemplos que vienen con Allegro.

Pues bien, me da toda una serie de errores que empiezan así:

Compilador: Default compiler
Ejecutando  gcc.exe...
gcc.exe "C:\allegro\examples\exhello.c" -o "C:\allegro\examples\exhello.exe"   -lalleg  -I"C:\devcpp\include"   -L"C:\devcpp\lib"
In file included from C:/devcpp/include/allegro/base.h:26,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stdarg.h:6:24: stdarg.h: No such file or directory
In file included from C:/devcpp/include/allegro/base.h:27,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/devcpp/include/stdlib.h:38,
                 from C:/devcpp/include/allegro/base.h:28,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/devcpp/include/allegro/base.h:28,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stdlib.h:94: parse error before '*' token

C:/devcpp/include/stdlib.h:94: warning: data definition has no type or storage class

C:/devcpp/include/stdlib.h:164: parse error before '*' token

C:/devcpp/include/stdlib.h:164: warning: data definition has no type or storage class

C:/devcpp/include/stdlib.h:277: parse error before '*' token

C:/devcpp/include/stdlib.h:277: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:327: parse error before '*' token
C:/devcpp/include/stdlib.h:328: parse error before '*' token
C:/devcpp/include/stdlib.h:342: parse error before '*' token
C:/devcpp/include/stdlib.h:344: parse error before '*' token
C:/devcpp/include/stdlib.h: In function `wcstof':
C:/devcpp/include/stdlib.h:345: `nptr' undeclared (first use in this function)
C:/devcpp/include/stdlib.h:345: (Each undeclared identifier is reported only once
C:/devcpp/include/stdlib.h:345: for each function it appears in.)
C:/devcpp/include/stdlib.h:345: `endptr' undeclared (first use in this function)
C:/devcpp/include/stdlib.h: At top level:
C:/devcpp/include/stdlib.h:346: parse error before '*' token
C:/devcpp/include/stdlib.h:349: parse error before '*' token
C:/devcpp/include/stdlib.h:350: parse error before '*' token
C:/devcpp/include/stdlib.h:354: parse error before "wcstombs"
C:/devcpp/include/stdlib.h:354: parse error before '*' token
C:/devcpp/include/stdlib.h:354: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:355: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:357: parse error before "size_t"
C:/devcpp/include/stdlib.h:358: parse error before "mbstowcs"
C:/devcpp/include/stdlib.h:358: parse error before '*' token
C:/devcpp/include/stdlib.h:358: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:359: parse error before '*' token

C:/devcpp/include/stdlib.h:364: warning: parameter names (without types) in function declaration
C:/devcpp/include/stdlib.h:365: warning: parameter names (without types) in function declaration
C:/devcpp/include/stdlib.h:366: parse error before "size_t"
C:/devcpp/include/stdlib.h:376: parse error before "size_t"
C:/devcpp/include/stdlib.h:377: parse error before ')' token
C:/devcpp/include/stdlib.h:378: parse error before "size_t"
C:/devcpp/include/stdlib.h:379: parse error before ')' token
C:/devcpp/include/stdlib.h:429: parse error before "size_t"
C:/devcpp/include/stdlib.h:435: parse error before '*' token
C:/devcpp/include/stdlib.h:435: parse error before "wchar_t"

C:/devcpp/include/stdlib.h:435: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:436: parse error before '*' token
C:/devcpp/include/stdlib.h:436: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:436: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:437: parse error before '*' token
C:/devcpp/include/stdlib.h:437: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:437: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:443: parse error before '*' token
C:/devcpp/include/stdlib.h:444: parse error before '*' token
C:/devcpp/include/stdlib.h:444: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:444: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:445: parse error before '*' token
C:/devcpp/include/stdlib.h:445: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:445: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:447: parse error before '*' token
C:/devcpp/include/stdlib.h:447: parse error before '*' token
C:/devcpp/include/stdlib.h:447: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:448: parse error before '*' token
C:/devcpp/include/stdlib.h:449: parse error before '*' token

C:/devcpp/include/stdlib.h:450: parse error before '*' token
C:/devcpp/include/stdlib.h:451: parse error before '*' token
C:/devcpp/include/stdlib.h:452: parse error before '*' token
C:/devcpp/include/stdlib.h:452: parse error before '*' token
C:/devcpp/include/stdlib.h:452: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:495: parse error before '*' token
C:/devcpp/include/stdlib.h:498: parse error before '*' token
C:/devcpp/include/stdlib.h:498: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:498: warning: data definition has no type or storage class

C:/devcpp/include/stdlib.h:499: parse error before '*' token
C:/devcpp/include/stdlib.h:499: parse error before "wchar_t"
C:/devcpp/include/stdlib.h:499: warning: data definition has no type or storage class
C:/devcpp/include/stdlib.h:508: parse error before '*' token
C:/devcpp/include/stdlib.h: In function `wtoll':
C:/devcpp/include/stdlib.h:509: `_w' undeclared (first use in this function)
C:/devcpp/include/stdlib.h: At top level:
C:/devcpp/include/stdlib.h:510: parse error before '*' token
C:/devcpp/include/stdlib.h:510: parse error before "wchar_t"
C:/devcpp/include/stdlib.h: In function `lltow':
C:/devcpp/include/stdlib.h:511: `_n' undeclared (first use in this function)
C:/devcpp/include/stdlib.h:511: `_w' undeclared (first use in this function)
C:/devcpp/include/stdlib.h:511: `_i' undeclared (first use in this function)
C:/devcpp/include/stdlib.h: At top level:
C:/devcpp/include/stdlib.h:512: parse error before '*' token
C:/devcpp/include/stdlib.h:512: parse error before "wchar_t"
C:/devcpp/include/stdlib.h: In function `ulltow':
C:/devcpp/include/stdlib.h:513: `_n' undeclared (first use in this function)
C:/devcpp/include/stdlib.h:513: `_w' undeclared (first use in this function)
C:/devcpp/include/stdlib.h:513: `_i' undeclared (first use in this function)
In file included from C:/devcpp/include/time.h:37,
                 from C:/devcpp/include/allegro/base.h:29,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/devcpp/include/sys/types.h:38,
                 from C:/devcpp/include/time.h:43,
                 from C:/devcpp/include/allegro/base.h:29,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/devcpp/include/allegro/base.h:29,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/time.h: At top level:
C:/devcpp/include/time.h:117: parse error before "strftime"
C:/devcpp/include/time.h:117: parse error before "size_t"
C:/devcpp/include/time.h:117: warning: data definition has no type or storage class
C:/devcpp/include/time.h:119: parse error before "wcsftime"
C:/devcpp/include/time.h:119: parse error before '*' token
C:/devcpp/include/time.h:119: warning: data definition has no type or storage class
C:/devcpp/include/time.h:128: parse error before "strftime"
C:/devcpp/include/time.h:128: parse error before "size_t"
C:/devcpp/include/time.h:128: warning: data definition has no type or storage class
C:/devcpp/include/time.h:189: parse error before '*' token
C:/devcpp/include/time.h:189: warning: data definition has no type or storage class
C:/devcpp/include/time.h:190: parse error before '*' token
C:/devcpp/include/time.h:190: warning: data definition has no type or storage class
C:/devcpp/include/time.h:191: parse error before '*' token
C:/devcpp/include/time.h:191: parse error before '*' token
C:/devcpp/include/time.h:191: warning: data definition has no type or storage class
C:/devcpp/include/time.h:192: parse error before '*' token
C:/devcpp/include/time.h:192: parse error before '*' token
C:/devcpp/include/time.h:192: warning: data definition has no type or storage class
In file included from C:/devcpp/include/stdio.h:42,
                 from C:/devcpp/include/io.h:36,
                 from C:/devcpp/include/allegro/platform/almngw32.h:22,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/devcpp/include/stdio.h:44,
                 from C:/devcpp/include/io.h:36,
                 from C:/devcpp/include/allegro/platform/almngw32.h:22,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stdarg.h:6:24: stdarg.h: No such file or directory
In file included from C:/devcpp/include/io.h:36,
                 from C:/devcpp/include/allegro/platform/almngw32.h:22,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stdio.h:204: parse error before "size_t"

C:/devcpp/include/stdio.h:215: parse error before "size_t"
C:/devcpp/include/stdio.h:216: parse error before "__gnuc_va_list"

C:/devcpp/include/stdio.h:217: parse error before "__gnuc_va_list"
C:/devcpp/include/stdio.h:218: parse error before "__gnuc_va_list"
C:/devcpp/include/stdio.h:219: parse error before "size_t"
C:/devcpp/include/stdio.h:222: parse error before "size_t"

C:/devcpp/include/stdio.h:223: parse error before "size_t"
C:/devcpp/include/stdio.h: In function `vsnprintf':
C:/devcpp/include/stdio.h:225: `s' undeclared (first use in this function)
C:/devcpp/include/stdio.h:225: `n' undeclared (first use in this function)
C:/devcpp/include/stdio.h:225: `format' undeclared (first use in this function)
C:/devcpp/include/stdio.h:225: `arg' undeclared (first use in this function)
C:/devcpp/include/stdio.h: At top level:
C:/devcpp/include/stdio.h:255: parse error before "fread"
C:/devcpp/include/stdio.h:255: parse error before "size_t"
C:/devcpp/include/stdio.h:255: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:256: parse error before "fwrite"
C:/devcpp/include/stdio.h:256: parse error before "size_t"
C:/devcpp/include/stdio.h:256: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:345: parse error before '*' token
C:/devcpp/include/stdio.h:346: parse error before '*' token
C:/devcpp/include/stdio.h:347: parse error before '*' token
C:/devcpp/include/stdio.h:348: parse error before '*' token
C:/devcpp/include/stdio.h:349: parse error before '*' token
C:/devcpp/include/stdio.h:350: parse error before '*' token
C:/devcpp/include/stdio.h:351: parse error before '*' token
C:/devcpp/include/stdio.h:352: parse error before '*' token
C:/devcpp/include/stdio.h:353: parse error before '*' token
C:/devcpp/include/stdio.h:354: parse error before '*' token
C:/devcpp/include/stdio.h:355: parse error before '*' token
C:/devcpp/include/stdio.h:356: parse error before "fgetwc"
C:/devcpp/include/stdio.h:356: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:357: parse error before "fputwc"
C:/devcpp/include/stdio.h:357: parse error before "FILE"
C:/devcpp/include/stdio.h:357: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:358: parse error before "ungetwc"
C:/devcpp/include/stdio.h:358: parse error before "FILE"
C:/devcpp/include/stdio.h:358: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:360: parse error before '*' token
C:/devcpp/include/stdio.h:360: parse error before '*' token
C:/devcpp/include/stdio.h:360: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:361: parse error before '*' token
C:/devcpp/include/stdio.h:362: parse error before "getwc"
C:/devcpp/include/stdio.h:362: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:363: parse error before "getwchar"
C:/devcpp/include/stdio.h:363: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:364: parse error before '*' token
C:/devcpp/include/stdio.h:364: parse error before '*' token
C:/devcpp/include/stdio.h:364: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:365: parse error before "putwc"
C:/devcpp/include/stdio.h:365: parse error before "FILE"
C:/devcpp/include/stdio.h:365: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:366: parse error before '*' token
C:/devcpp/include/stdio.h:367: parse error before "putwchar"
C:/devcpp/include/stdio.h:367: warning: parameter names (without types) in function declaration

C:/devcpp/include/stdio.h:367: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:368: parse error before "wchar_t"
C:/devcpp/include/stdio.h:369: parse error before '*' token

C:/devcpp/include/stdio.h:370: parse error before '*' token
C:/devcpp/include/stdio.h:371: parse error before '*' token
C:/devcpp/include/stdio.h:372: parse error before '*' token
C:/devcpp/include/stdio.h:372: parse error before '*' token
C:/devcpp/include/stdio.h:372: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:373: parse error before '*' token
C:/devcpp/include/stdio.h:373: parse error before '*' token
C:/devcpp/include/stdio.h:373: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:374: parse error before '*' token
C:/devcpp/include/stdio.h:375: parse error before '*' token
C:/devcpp/include/stdio.h:376: parse error before '*' token
C:/devcpp/include/stdio.h:377: parse error before '*' token
C:/devcpp/include/stdio.h:381: parse error before '*' token
C:/devcpp/include/stdio.h:383: parse error before '*' token
C:/devcpp/include/stdio.h: In function `vsnwprintf':
C:/devcpp/include/stdio.h:384: `s' undeclared (first use in this function)
C:/devcpp/include/stdio.h:384: `n' undeclared (first use in this function)
C:/devcpp/include/stdio.h:384: `format' undeclared (first use in this function)
C:/devcpp/include/stdio.h:384: `arg' undeclared (first use in this function)
C:/devcpp/include/stdio.h: At top level:
C:/devcpp/include/stdio.h:393: parse error before '*' token
C:/devcpp/include/stdio.h:400: parse error before "_fgetwchar"
C:/devcpp/include/stdio.h:400: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:401: parse error before "_fputwchar"
C:/devcpp/include/stdio.h:401: warning: parameter names (without types) in function declaration
C:/devcpp/include/stdio.h:401: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:406: parse error before "fgetwchar"
C:/devcpp/include/stdio.h:406: warning: data definition has no type or storage class
C:/devcpp/include/stdio.h:407: parse error before "fputwchar"
C:/devcpp/include/stdio.h:407: warning: parameter names (without types) in function declaration
C:/devcpp/include/stdio.h:407: warning: data definition has no type or storage class
In file included from C:/devcpp/include/allegro/platform/almngw32.h:22,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/io.h:95: parse error before "wchar_t"
C:/devcpp/include/io.h:95: warning: no semicolon at end of struct or union
C:/devcpp/include/io.h:103: parse error before "wchar_t"

C:/devcpp/include/io.h:103: warning: no semicolon at end of struct or union
C:/devcpp/include/io.h:231: parse error before '*' token
C:/devcpp/include/io.h:232: parse error before '*' token
C:/devcpp/include/io.h:233: parse error before '*' token
C:/devcpp/include/io.h:234: parse error before '*' token
C:/devcpp/include/io.h:236: parse error before '*' token
C:/devcpp/include/io.h:237: parse error before '*' token
C:/devcpp/include/io.h:238: parse error before '*' token
C:/devcpp/include/io.h:239: parse error before '*' token
C:/devcpp/include/io.h:239: parse error before '*' token
C:/devcpp/include/io.h:239: warning: data definition has no type or storage class
C:/devcpp/include/io.h:240: parse error before '*' token
In file included from C:/devcpp/include/direct.h:38,
                 from C:/devcpp/include/allegro/platform/almngw32.h:24,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/devcpp/include/allegro/platform/almngw32.h:24,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/direct.h:77: parse error before '*' token
C:/devcpp/include/direct.h:78: parse error before '*' token
C:/devcpp/include/direct.h:78: parse error before '*' token
C:/devcpp/include/direct.h:78: warning: data definition has no type or storage class
C:/devcpp/include/direct.h:79: parse error before '*' token
C:/devcpp/include/direct.h:79: parse error before "wchar_t"
C:/devcpp/include/direct.h:79: warning: data definition has no type or storage class
C:/devcpp/include/direct.h:80: parse error before '*' token
C:/devcpp/include/direct.h:81: parse error before '*' token
In file included from C:/devcpp/include/allegro/platform/almngw32.h:25,
                 from C:/devcpp/include/allegro/internal/alconfig.h:44,
                 from C:/devcpp/include/allegro/base.h:40,
                 from C:/devcpp/include/allegro.h:25,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/malloc.h:48: parse error before "size_t"
C:/devcpp/include/malloc.h:48: warning: no semicolon at end of struct or union
C:/devcpp/include/malloc.h:50: parse error before '}' token
C:/devcpp/include/malloc.h:50: warning: data definition has no type or storage class
C:/devcpp/include/malloc.h:63: parse error before '*' token
C:/devcpp/include/malloc.h:69: parse error before '*' token
C:/devcpp/include/malloc.h:79: parse error before "_msize"
C:/devcpp/include/malloc.h:79: warning: data definition has no type or storage class
C:/devcpp/include/malloc.h:80: parse error before "_get_sbh_threshold"
C:/devcpp/include/malloc.h:80: warning: data definition has no type or storage class
C:/devcpp/include/malloc.h:81: warning: parameter names (without types) in function declaration
C:/devcpp/include/malloc.h:82: parse error before "size_t"

In file included from C:/devcpp/include/allegro.h:30,
                 from C:/allegro/examples/exhello.c:9:
C:/devcpp/include/allegro/unicode.h:70: warning: parameter names (without types) in function declaration

C:/devcpp/include/allegro/unicode.h:93: parse error before "va_list"

Ejecución Terminada


¿Qué diablos estoy haciendo mal? Agradecería cualquier sugerencia...

Antes de que me digais nada de que actualice las versiones, os diré que también he probado con versiones más recientes, y el resultado es idéntico...

Muchas gracias, y saludos.

Páginas: [1]