Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Error: 'No matching function for call to 'al_load_bitmap'

This thread is locked; no one can reply to it. rss feed Print
Error: 'No matching function for call to 'al_load_bitmap'
Skewbie
Member #15,211
July 2013
avatar

Hello,

Just a heads up: I'm using Allegro 5 on OS X Mountain Lion with Xcode.

I'm brand new to the Allegro framework (and C++ for that matter) and I'm having trouble using the al_load_bitmap function. As soon as I input that function I get an error saying, "No matching function for call to 'al_load_bitmap'".

I've made sure to include both the <allegro5/allegro.h> and <allegro5/allegro_image.h> files (in that order) but still no luck. The game will not compile in its current state.

My first thought was that it was possible I forgot to link a library, but I do have the AllegroImage-5.1.framework (along with many others) linked in Xcode. I also read online that this can happen if you don't include the correct .dll, .so, or .dylib (depending on your platform) for the image library, but I'm unsure as to whether or not I've done that correctly.

Any help would be greatly appreciated!

Matthew Leverton
Supreme Loser
January 1999
avatar

What parameter are you passing it? If passing a C++ string, be sure to use the .c_str() method.

Skewbie
Member #15,211
July 2013
avatar

Thanks Matthew! That fixed the error I was receiving.

Go to: