Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Again with 4.9.5 on Windows using Visual Studio 9 2008

This thread is locked; no one can reply to it. rss feed Print
Again with 4.9.5 on Windows using Visual Studio 9 2008
Don Freeman
Member #5,110
October 2004
avatar

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?!? :(

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

OnlineCop
Member #7,919
October 2006
avatar

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.

Don Freeman
Member #5,110
October 2004
avatar

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:

1Linking...
2Animation.obj : error LNK2001: unresolved external symbol __imp__al_get_bitmap_width
3Animation.obj : error LNK2001: unresolved external symbol __imp__al_draw_rotated_scaled_bitmap
4Animation.obj : error LNK2001: unresolved external symbol __imp__al_destroy_bitmap
5Animator.obj : error LNK2001: unresolved external symbol __imp__al_iio_load
6Entity.obj : error LNK2001: unresolved external symbol __imp__al_map_rgb
7Entity.obj : error LNK2001: unresolved external symbol __imp__al_draw_rectangle
8Game.obj : error LNK2001: unresolved external symbol __imp__al_set_new_display_flags
9Game.obj : error LNK2001: unresolved external symbol __imp__al_flip_display
10Game.obj : error LNK2001: unresolved external symbol __imp__al_get_next_event
11Game.obj : error LNK2001: unresolved external symbol __imp__al_destroy_event_queue
12Game.obj : error LNK2001: unresolved external symbol __imp__al_register_event_source
13Game.obj : error LNK2001: unresolved external symbol __imp__al_clear
14Game.obj : error LNK2001: unresolved external symbol __imp__al_font_init
15Game.obj : error LNK2001: unresolved external symbol __imp__al_create_event_queue
16Game.obj : error LNK2001: unresolved external symbol __imp__al_get_keyboard
17Game.obj : error LNK2001: unresolved external symbol __imp__al_create_display
18Game.obj : error LNK2001: unresolved external symbol __imp__al_install_system
19Game.obj : error LNK2001: unresolved external symbol __imp__al_ttf_load_font
20Game.obj : error LNK2001: unresolved external symbol __imp__al_iio_init
21Game.obj : error LNK2001: unresolved external symbol __imp__al_destroy_display
22Game.obj : error LNK2001: unresolved external symbol __imp__al_install_keyboard
23Game.obj : error LNK2001: unresolved external symbol __imp__al_current_time
24Game.obj : error LNK2001: unresolved external symbol __imp__al_rest
25Gui.obj : error LNK2001: unresolved external symbol __imp___ustrdup
26Gui.obj : error LNK2001: unresolved external symbol __imp__al_map_rgba_f
27Gui.obj : error LNK2001: unresolved external symbol __imp__al_font_textout_centre
28Gui.obj : error LNK2001: unresolved external symbol __imp__al_set_blender
29Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_keycode_to_name
30Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_font_textout
31Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_get_display_height
32Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_get_display_width
33Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_key_down
34Keyboard_menu.obj : error LNK2001: unresolved external symbol __imp__al_get_keyboard_state
35Tileset.obj : error LNK2001: unresolved external symbol __imp__al_draw_bitmap_region
36Tileset.obj : error LNK2001: unresolved external symbol __imp__al_get_bitmap_height
37C:\Users\Don\Desktop\Programming\Visual Studio 2008\Monday\Release\Monday.exe : fatal error LNK1120: 35 unresolved externals
38Build log was saved at "file://c:\Users\Don\Desktop\Programming\Visual Studio 2008\Monday\Monday\Release\BuildLog.htm"
39Monday - 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!:(

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Evert
Member #794
November 2000
avatar

Quote:

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.

Don Freeman
Member #5,110
October 2004
avatar

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

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Evert
Member #794
November 2000
avatar

Quote:

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.

Don Freeman
Member #5,110
October 2004
avatar

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...

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Thomas Fjellstrom
Member #476
June 2000
avatar

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.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Don Freeman
Member #5,110
October 2004
avatar

I would prefer an nvidia card, but it looks like (at least for awhile) that ati is the way to go for linux support.

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Milan Mimica
Member #3,877
September 2003
avatar

When you link to static version of allegro (and you do) you must define ALLEGRO_STATIC preprocessor symbol.

Don Freeman
Member #5,110
October 2004
avatar

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.

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

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).

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Don Freeman
Member #5,110
October 2004
avatar

Quote:

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. :P

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Go to: