Configuration Allegro 5 avec Code::Blocks sous Ubuntu
Bonjour,
J'ai essayé ce petit programme qui se propose de vérifier l'installation d'allegro 5 sur code::block
Code:
1 2 3 4 5 6 7 8 9 10
| #include <stdio.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_native_dialog.h>
// fonction simple pour le contrôle d'erreur
void erreur(const char*txt)
{
al_show_native_message_box(NULL, "ERREUR", txt, NULL, NULL, 0);
exit(EXIT_FAILURE);
} |
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| int main()
{
// obligatoire pour utiliser allegro
if (!al_init())
erreur("al_init()");
// un petit message de bienvenue
al_show_native_message_box(NULL, "Premier programme",
"Hello allegro !", NULL, NULL, 0);
return 0;
} |
Je ne maîtrise pas encore très bien code::Blocks mais après compilation j'ai une 2 eme fenêtre qui s'ouvre à coté du main, sur laquelle il est écrit :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| Configuration defines for use with Mingw32.
*
* By Michael Rickmann.
*
* Native build version by Henrik Stokseth.
*
* See readme.txt for copyright information.
*/
io#include <io.h>
#include <fcntl.h>
#include <direct.h>
#include <malloc.h>
#include "allegro5/platform/alplatf.h"
/* describe this platform */
#ifdef ALLEGRO_STATICLINK
#define ALLEGRO_PLATFORM_STR "MinGW32.s"
#else
#define ALLEGRO_PLATFORM_STR "MinGW32"
#endif
#define ALLEGRO_WINDOWS
#define ALLEGRO_I386
#define ALLEGRO_LITTLE_ENDIAN
#ifdef ALLEGRO_USE_CONSOLE
#define ALLEGRO_NO_MAGIC_MAIN
#endif
/* describe how function prototypes look to MINGW32 */
#if (defined ALLEGRO_STATICLINK) || (defined ALLEGRO_SRC)
#define _AL_DLL
#else
#define _AL_DLL __declspec(dllimport)
#endif
#define AL_VAR(type, name) extern _AL_DLL type name
#define AL_ARRAY(type, name) extern _AL_DLL type name[]
#define AL_FUNC(type, name, args) extern type name args
#define AL_METHOD(type, name, args) type (*name) args
#define AL_FUNCPTR(type, name, args) extern _AL_DLL type (*name) args
/* windows specific defines */
#if (defined ALLEGRO_SRC)
/* pathches to handle DX7 headers on a win9x system */
/* should WINNT be defined on win9x systems? */
#ifdef WINNT
#undef WINNT
#endif
/* defined in windef.h */
#ifndef HMONITOR_DECLARED
#define HMONITOR_DECLARED 1
#endif
#endif /* ALLEGRO_SRC */
/* another instance of missing constants in the mingw32 headers */
#ifndef ENUM_CURRENT_SETTINGS
#define ENUM_CURRENT_SETTINGS ((DWORD)-1)
#endif
/* arrange for other headers to be included later on */
#define ALLEGRO_EXTRA_HEADER "allegro5/platform/alwin.h"
#define ALLEGRO_INTERNAL_HEADER "allegro5/platform/aintwin.h"
#define ALLEGRO_INTERNAL_THREAD_HEADER "allegro5/platform/aintwthr.h" |
Le résultat de ma commande uname -a :
Citation:
chris@chris:~$ uname -a
Linux chris 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Me voila encore un peu perdu .. Que dois-je faire ?