Building Allegro 4.9.5 for visual studio 2008 (visual studio 9)
My problems so far...Any help?!?
Actions performed:
copyed zlib/include/* to visual studio/vc/include
copyed zlib/lib/* to visual studio/vc/lib
copyed libpng/include/* to visual studio/vc/include
copyed libpng/lib/* to visual studio/vc/lib
copyed program files/gnuw32/include/freetype/* to visual studio/vc/include
copyed program files/gnuw32/lib/freetype/* to visual studio/vc/lib
copyed libvorbis/include/* to visual studio/vc/include
copyed libvorbis/lib/* to visual studio/vc/lib
copyed libogg/include/* to visual studio/vc/include
copyed libogg/lib/* to visual studio/vc/lib
copyed msdk (august 2007)/include/* to visual studio/vc/include
copyed msdk (august 2007)/lib/x86/* to visual studio/vc/lib
ran visual studio command prompt (which set the build environment)
cd\allegro\4.9.5
mkdir build
cd build
cmake -G "Visual Studio 9 2008" ../
Results from cmake. (Had to attach the output because the total is too big for posting...:()
cmake generates the allegro.sln file
load the allegro.sln file
select the Release configuration
build
Build results. (Had to attach because it was too large to post...:()
Any suggestions?!?
Don, do you have the latest version of CMake that includes "cmake-gui.exe"? If you do, that's how I've been doing it every time I compile Allegro. I get a nice graphical thing that shows what I can have and what I need, and then make it generate the makefile (I use the MinGW makefile, but it lets you choose whichever makefile you want, like for MSVC). Even though I've got MSVC on this laptop, I rarely use it for non-work projects (like Allegro-related), so I'm not much help there.
I'll try that next...I compiled all of allegro again, this time I got 200 projects to build correctly, but it is still not correct!
When trying to compile "Monday" with the version of allegro that I WAS able to compile, I get:
| 1 | Linking... |
| 2 | Animation.obj : error LNK2001: unresolved external symbol __imp__al_get_bitmap_width |
| 3 | Animation.obj : error LNK2001: unresolved external symbol __imp__al_draw_rotated_scaled_bitmap |
| 4 | Animation.obj : error LNK2001: unresolved external symbol __imp__al_destroy_bitmap |
| 5 | Animator.obj : error LNK2001: unresolved external symbol __imp__al_iio_load |
| 6 | Entity.obj : error LNK2001: unresolved external symbol __imp__al_map_rgb |
| 7 | Entity.obj : error LNK2001: unresolved external symbol __imp__al_draw_rectangle |
| 8 | Game.obj : error LNK2001: unresolved external symbol __imp__al_set_new_display_flags |
| 9 | Game.obj : error LNK2001: unresolved external symbol __imp__al_flip_display |
| 10 | Game.obj : error LNK2001: unresolved external symbol __imp__al_get_next_event |
| 11 | Game.obj : error LNK2001: unresolved external symbol __imp__al_destroy_event_queue |
| 12 | Game.obj : error LNK2001: unresolved external symbol __imp__al_register_event_source |
| 13 | Game.obj : error LNK2001: unresolved external symbol __imp__al_clear |
| 14 | Game.obj : error LNK2001: unresolved external symbol __imp__al_font_init |
| 15 | Game.obj : error LNK2001: unresolved external symbol __imp__al_create_event_queue |
| 16 | Game.obj : error LNK2001: unresolved external symbol __imp__al_get_keyboard |
| 17 | Game.obj : error LNK2001: unresolved external symbol __imp__al_create_display |
| 18 | Game.obj : error LNK2001: unresolved external symbol __imp__al_install_system |
| 19 | Game.obj : error LNK2001: unresolved external symbol __imp__al_ttf_load_font |
| 20 | Game.obj : error LNK2001: unresolved external symbol __imp__al_iio_init |
| 21 | Game.obj : error LNK2001: unresolved external symbol __imp__al_destroy_display |
| 22 | Game.obj : error LNK2001: unresolved external symbol __imp__al_install_keyboard |
| 23 | Game.obj : error LNK2001: unresolved external symbol __imp__al_current_time |
| 24 | Game.obj : error LNK2001: unresolved external symbol __imp__al_rest |
| 25 | Gui.obj : error LNK2001: unresolved external symbol __imp___ustrdup |
| 26 | Gui.obj : error LNK2001: unresolved external symbol __imp__al_map_rgba_f |
| 27 | Gui.obj : error LNK2001: unresolved external symbol __imp__al_font_textout_centre |
| 28 | Gui.obj : error LNK2001: unresolved external symbol __imp__al_set_blender |
| 29 | Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_keycode_to_name |
| 30 | Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_font_textout |
| 31 | Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_get_display_height |
| 32 | Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_get_display_width |
| 33 | Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_key_down |
| 34 | Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_get_keyboard_state |
| 35 | Tileset.obj : error LNK2001: unresolved external symbol __imp__al_draw_bitmap_region |
| 36 | Tileset.obj : error LNK2001: unresolved external symbol __imp__al_get_bitmap_height |
| 37 | C:\Users\Don\Desktop\Programming\Visual Studio 2008\Monday\Release\Monday.exe : fatal error LNK1120: 35 unresolved externals |
| 38 | Build log was saved at "file://c:\Users\Don\Desktop\Programming\Visual Studio 2008\Monday\Monday\Release\BuildLog.htm" |
| 39 | Monday - 36 error(s), 0 warning(s) |
| 40 | ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
Looks like it is looking for symbols in the allegro lib that it can't find...I use these for the libs, so I know it is there:
$(NOINHERIT) kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib a5_font_s.lib a5_iio_s.lib a5_acodec_s.lib kcm_audio_s.lib alleg_s-4.9.5.lib libpng.lib zdll.lib vorbisfile.lib vorbis.lib ogg.lib dsound.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput8.lib dxguid.lib winmm.lib d3d9.lib opengl32.lib glu32.lib lua5.1.lib
I am SOOOOOO frustrated! I remember when allegro was just a simple fix and then make. Arghhh!:-/
Don't know if it's the same thing, but I've used the little icon for cmake. It gives me a gui...and I've set all the directories by hand and still...same crap!:(
I remember when allegro was just a simple fix and then make.
You have to remember one thing: you're using a work-in-progress release that's bound to have flaws and problems. The build system is a little rough, but things are improving by leaps and bounds.
I know...I can get (or at least I believe) a static system built ok, but there seems to be something with the shared build that it doesn't like. 4.9.3 was ok for me...just no a5_iio and such. 
Also:
I think allegro has issues with opengl and ati chipsets. See this.:o
I think allegro has issues with opengl and ati chipsets. See this.
It seems to work fine on my Mac. That's not to say it'll work the same in Linux though (despite the OpenGL driver being shared across platforms); ATi cards tend to be horribly broken in my experience, and I'm not alone.
I would agree...my only beef with nVidia was this and the fact that their drivers do not work correctly with the new X11...well, it's not really "standardized" yet..so I can't really blame them for that one, but I've never experienced anything like that myself. I believe I've only had two ATI cards...my first computer (HP...hey I was young and dumb), and this laptop. I've never bought one itset. I've always liked nVidia. I heard they where the only one with an opengl 3.0. I haven't seen it though...
Funny, I've had nothing but problems with new Nvidia cards... and my new ATI card "just works". ATI even supports XRandR 1.2 now, and nvidia has no ETA for that. ATI is even going to support full hardware (UVD) video decoding soon, and nvidia will likely never support that on linux desktops.
I would prefer an nvidia card, but it looks like (at least for awhile) that ati is the way to go for linux support.
When you link to static version of allegro (and you do) you must define ALLEGRO_STATIC preprocessor symbol.
This is the preprocessor defines I have for the release version:
WIN32,_WINDOWS,NDEBUG,ALLEGRO_STATICLINK,_CRT_SECURE_NO_DEPRECATE,_CRT_NONSTDC_NO_DEPRECATE
I get the "Monday" Project to compile with no errors or warnings, but I get a:
loading: media/Gryphon_fly_u1.png libpng error: 0
or sometimes I get:
loading: media/Gryphon_fly_u1.png
libpng error: Invalid image color type specified
This is weird...it is in the same place, and the data has not moved.:o
See this thread as well...:-/
I found and fixed the problems: One was with the libpng12.dll I had and the rest of the problems where with the end of lines under windows. Maybe we should be defaulting to the windows style end of lines, because I believe under Linux, the extra cr is not a problem.
I believe under Linux, the extra cr is not a problem.
It is, its binary garbage in a text file. Just code your text reading functions to always open in binary mode and detect all three line ending formats (windows: \r\n, unix: \n, MAC: \r).
It is, its binary garbage in a text file. Just code your text reading functions to always open in binary mode and detect all three line ending formats (windows: \r\n, unix: \n, MAC: \r).
Thanks for the info!
I will look at the loading code for "Monday" and see what I can do.