elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación C/C++ (Moderadores: Eternal Idol, Littlehorse, K-YreX)
| | |-+  Allegro.h en C::B y Mingw
0 Usuarios y 2 Visitantes están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Allegro.h en C::B y Mingw  (Leído 2,729 veces)
ie8

Desconectado Desconectado

Mensajes: 4


Ver Perfil
Allegro.h en C::B y Mingw
« en: 17 Enero 2011, 22:14 pm »

Hola, estoy utilizando el IDE Code::Blocks en su última versión, utilizo el compilador Mingw. Quiero probar e iniciarme con allegro.h, pero no he conseguido instalarlo correctamente para poder usarlo.

Me he descargado allegro.h
http://sourceforge.net/projects/alleg/files/allegro-unstable/4.9.22/allegro-4.9.22.zip/download

4.9.22 ya que la más reciente es una Beta y no me fiaba. Lo que hago para instalarlo es ir a la ruta donde está Mingw y copiar todos los archivos que estan en include en el archivo que me baje al include del compilador.

Vi en otros tutoriales que también copiaba los archivos lib del zip que me baje, pero el tutorial era para otra versión.

Está mal instalado porque al probar el código que pongo mas abajo me salta muchisimos errores, en los .h que inclue allegro.

El código:
Código:
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
int main()
{
allegro_init();
install_keyboard();
if (set_gfx_mode(GFX_AUTODETECT,320,200,0,0)<0)
{
printf("error al iniciar modo grafico\n");
allegro_exit();
exit(-1);
}
textout(screen, font, "Mi primer programa", 0, 0, 15);
readkey();
allegro_exit();
return 0;
}

Errores que me da:

Citar
||=== ppppppppppppppppppp, Debug ===|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|36|error: allegro/platform/alplatf.h: No such file or directory|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|66|error: #error platform not supported|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\platform\astdint.h|44|error: #error I dunno how to get the definitions of fixed-width integer types on your platform. Please report this to your friendly Allegro developer.|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|381|error: #error endianess not defined|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|401|error: expected ')' before 'addr'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|401|error: expected ')' before 'addr'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|411|error: expected ')' before 'addr'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\internal\alconfig.h|411|error: expected ')' before 'addr'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\fixed.h|28|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\fixed.h|30|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fixtorad_r'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\fixed.h|31|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'radtofix_r'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\3d.h|33|error: expected specifier-qualifier-list before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\3d.h|73|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\3d.h|73|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\3d.h|76|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'polygon_z_normal'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|208|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|208|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|208|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|208|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|208|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|208|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|219|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\gfx.h|219|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|58|error: expected declaration specifiers or '...' before '*' token|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|58|error: 'uintptr_t' declared as function returning a function|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|62|error: 'bmp_write_line' declared as function returning a function|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|62|error: 'bmp_write_line' declared as function returning a function|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl||In function 'bmp_write_line':|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|62|error: '_BMP_BANK_SWITCHER' undeclared (first use in this function)|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|62|error: (Each undeclared identifier is reported only once|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|62|error: for each function it appears in.)|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|62|error: expected ';' before 'switcher'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|69|error: 'bmp_read_line' declared as function returning a function|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|69|error: 'bmp_read_line' declared as function returning a function|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl||In function 'bmp_read_line':|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|69|error: '_BMP_BANK_SWITCHER' undeclared (first use in this function)|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\inline\gfx.inl|69|error: expected ';' before 'switcher'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|50|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|50|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|51|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|51|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|63|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|64|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|65|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|65|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|66|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|66|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|67|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|68|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|69|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|69|error: expected declaration specifiers or '...' before 'fixed'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\allegro\draw.h|70|error: expected declaration specifiers or '...' before 'fixed'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|

Con Dev C C++, y con el actualizador suyo instale allegro errores:


« Última modificación: 17 Enero 2011, 22:59 pm por ie8 » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
MinGW
Programación C/C++
farresito 9 7,288 Último mensaje 3 Agosto 2010, 00:00 am
por farresito
QT SDK contiene el compilador MinGW? o lo tengo q bajar aparte?
Programación General
Synth3tik0 0 2,685 Último mensaje 8 Agosto 2011, 20:51 pm
por Synth3tik0
Instalador offline de MinGW
Software
Lawdown 0 2,352 Último mensaje 15 Diciembre 2011, 00:15 am
por Lawdown
Version de compilador MINGW en codeblocks
Programación C/C++
Hackkemate 2 4,496 Último mensaje 19 Mayo 2013, 04:08 am
por Hackkemate
Instalación compilador GCC para ANSI C ¿32 o 64 bits? ¿MinGW o mingw-w64?
Programación C/C++
pacobsas 2 2,817 Último mensaje 10 Mayo 2016, 22:42 pm
por pacobsas
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines