|
Building Allegro 5.1 with cmake for MSVC 2008 |
komons
Member #11,083
June 2009
|
Hi I try make a allegro5.1 project for Visual c++ 2008, by cmake. 1Guessed MSVC directory: cl
2Allowing MSVC to use SSE instructions
3Could NOT find GDIPLUS (missing: GDIPLUS_INCLUDE_DIR GDIPLUS_LIBRARY)
4WARNING: cannot use GDI+. Will try other libraries.
5Could NOT find PNG (missing: PNG_LIBRARY)
6WARNING: libpng not found, disabling support
7Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
8WARNING: libjpeg not found, disabling support
9Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
10Could NOT find FLAC (missing: FLAC_INCLUDE_DIR OGG_LIBRARY FLAC_LIBRARY)
11WARNING: libFLAC not found or compile test failed, disabling support.
12Could NOT find DUMB (missing: DUMB_INCLUDE_DIR DUMB_LIBRARY)
13WARNING: libdumb not found or compile test failed, disabling support. <http://dumb.sourceforge.net/>
14Could NOT find VORBIS (missing: OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
15WARNING: libvorbis not found or compile test failed, disabling support.
16Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
17WARNING: FreeType not found, disabling support.
18Could NOT find PhysFS (missing: PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
19Could NOT find PHYSFS (missing: PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
20Not building ex_color
21Not building ex_physfs
22Not building ex_font_justify
23Not building ex_logo
24Not building ex_ttf
25Not building ex_audio_chain
26Not building ex_synth
27Configuring done
It can't find libraries that I downloaded and I put in folders. First I downloaded setup from, for example from here (libpng): http://gnuwin32.sourceforge.net/packages/libpng.htm 1Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
2WARNING: libpng not found, disabling support
Okey, second try. I downloaded Developer files from same website and I put it in Visual include and lib folders. So, third half-lucky try: I found a path in cmake files for png headers: \usr\local\include\libpng 1Could NOT find PNG (missing: PNG_LIBRARY)
2WARNING: libpng not found, disabling support
Shows that headers are. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I believe the suggested method to compile this way is to put all of your include and lib folder contents inside a folder named 'deps' that you create in your allegro folder that you are building. So you have : allegro deps include headers lib .lib's usr/local is for *NIX systems, I don't know why cmake would look there when generating an MSVC project. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
komons
Member #11,083
June 2009
|
Thanks, it work. But I have some problem with the compiled allegro. When I run my program, MSVC shows error: 1bool al_install_keyboard(void)
2{
3 if (new_keyboard_driver)
4 return true;
5
6 //FIXME: seems A4/A5 driver list stuff doesn't quite agree right now
7 if (al_get_system_driver()->vt->get_keyboard_driver) {
8 new_keyboard_driver = al_get_system_driver()->vt->get_keyboard_driver();
9 if (!new_keyboard_driver->init_keyboard()) {
10 new_keyboard_driver = NULL;
11 return false;
12 }
13 _al_add_exit_func(al_uninstall_keyboard, "al_uninstall_keyboard");
14 return true;
15 }
in this line: 1if (al_get_system_driver()->vt->get_keyboard_driver) {
Allegro5.1 are compiled with 0 errors. But I downloaded dependences pack for allegro 4.9.8 from allegro.cc forum: Maybe it's a reason? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Did you call al_init before you called al_install_keyboard? The dependent libraries you downloaded should still work, and you only have to link with them if you are static linking, or you use functionality from them. That's because the Allegro dll's have already been linked to them. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
komons
Member #11,083
June 2009
|
Edgar Reynaldo said: Did you call al_init before you called al_install_keyboard? Yes. It's my program which work with allegro 5.0.3 binaries, but with 5.1 not. EDIT: I make project with new deps, that are downloaded by me, and still same problem with keyboard. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Is your program using the right dll's? The init functions may be failing due to incompatible dll's. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
komons
Member #11,083
June 2009
|
In MSVC bin folder I have only 5.1 dll's, that I compiled. And not work. I'm not sure, but maybe it's because I compiled allegro with using WindowsJG it's a mod for XP. So maybe keyboard driver are - I don't know - avaliable by another way |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The line it is crashing on indicates that the allegro system driver is probably NULL. That probably means al_init is failing to begin with. Build the debugging version of Allegro and link with that instead. That will give you an allegro.log file that may tell what is failing. cd allegro\build cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 9 2008" ..
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
komons
Member #11,083
June 2009
|
Nevermind, at now allegro5.1 work for me exclude al_uninstall_system(); I just removed it from my code :O Anyway, thanks. Now I'm trying to understand shader addon. |
|