The code is long so I will just show the main graphics init, what doesn't work.
Code:
#include <allegro.h>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <./allegro/gfx.h>
using namespace std;
void setupGraphics(){
buffer = create_bitmap( 1024, 768);
draw_sprite( buffer, sBottom_bar, 0, 678);
draw_sprite( buffer, sBarInfo, 180, 678);
draw_sprite( buffer, sTopBar, 0, 0);
show_mouse(buffer);
draw_sprite( screen, buffer, 0, 0);
}
int main(){
allegro_init();
install_keyboard();
install_mouse();
set_color_depth(16);
set_gfx_mode( GFX_AUTODETECT, 1024, 768, 0, 0);
setupGraphics();
while( !key[KEY_ESC]){
timeLine();
getMouseKlick();
updateScreen();
}
return 0;
}
END_OF_MAIN();
This is the output of the allegro-config --libs:
Code:
-L/usr/lib -L/usr/lib64 -Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable
But the above example compilation on commandline did actually work with the allegro-config --libs. It compiled the code (although I can see only black screen).
The problem is that I cannot do the same within the Kdevelop.
the errors are reported for each function within the allegro as undefined reference to the function. (create_bitmap(), draw_sprite())
I need to somehow tell the same configuration option to the Kdevelop. I cannot find anything in the settings within Kdevelop where I can set this.
What does this actually mean - I tell the g++ compiler where to find the allegro libraries?
What command is executed when I start within the kdevelop the "Build Project" - g++ main.cpp -o main??
Within the root project directory there is a build directory which contains the file "CMakeCache.txt" - there are lots of "path to a library" definitions. Should I define here the path to the alegro library??