Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » C++ game not compiling - identifiers not found for allegro functions

This thread is locked; no one can reply to it. rss feed Print
C++ game not compiling - identifiers not found for allegro functions
ekalwa
Member #16,350
May 2016

I’m working with my Little Brother to show him C++ game programming, so wanted to load and compile a Pong game in Microsoft Visual Studio Express 2013.

Referring to this Pong game web-page:
http://www.cppgameprogramming.com/cgi/nav.cgi?page=pong

I’m trying to get Allegro5 working within Visual Studio 2013. I get errors starting with the “BITMAP *buffer;” line in your pong.c source-code, and then it can’t find the acquire_screen() function and others. See attached debugger window with errors circled. I successfully added Allegro5 to my Project via NuGet with dependencies library too, and enabled all Allegro5 Add-ons and Library Type = Debug-Dynamic, etc. One error goes away for that 1st line when I change BITMAP to ALLEGRO_BITMAP. But I still get the “identifier not found” with all those allegro library functions, even though I’ve set my MSVS library link path to include allegro.lib, and I’ve installed Allegro5 via NuGet to this Project in MSVS.

I confirmed Allegro5 is installed correctly and working, by verifying it from these instructions here:
http://stackoverflow.com/questions/33557962/allegro-5-visual-studio-2015.

So what other Allegro library do I need to resolve those “identifier not found” messages?

Thanks!

torhu
Member #2,727
September 2002
avatar

That game is using Allegro 4, while you have got Allegro 5 ;)

ekalwa
Member #16,350
May 2016

Hmmm. Thanks for the quick reply!

But the Allegro website still maintains all those functions like acquire_screen(), circlefill(), etc. So why are they missing in the Allegro5.2 I downloaded and installed via NuGet?

Are there replacements for all those functions in Allegro5?

At least I don't see any instructions for how to replace Allegro4 functions and procedures with Allegro5 ones. Is there a URL somewhere with instructions to upgrade Allegro4 source-code to Allegro5?

Niunio
Member #1,975
March 2002
avatar

Allegro 5 has a very different API. There's no easy way to upgrade from Allegro 4 to Allegro 5.

-----------------
Current projects: Allegro.pas | MinGRo

Audric
Member #907
January 2001

Hi and welcome ekalwa!
To compile such game made in Allegro4, you can use the files from here : https://www.allegro.cc/files/?v=4.4
MSVC10 means Visual Studio 2010, I guess you won't find a more recent one.

edit: The site still maintains both documentations, sorry that it's not made clearer, the naming conventions generally give the context :
- ALLEGRO_BITMAP, al_something() -> Allegro 5,
- BITMAP, create_bitmap() -> Allegro 4.

ekalwa
Member #16,350
May 2016

OK, great! Thanks to both of you for the recent replies, and link to the Allegro4 downloads.

Whew!

Go to: