Skip to content

Instantly share code, notes, and snippets.

@zrbecker
Created April 1, 2011 06:19
Show Gist options
  • Save zrbecker/897815 to your computer and use it in GitHub Desktop.
Save zrbecker/897815 to your computer and use it in GitHub Desktop.
zrbecker@Zach-UVM:~/Documents/Programming$ cat allegro_test.c
#include <allegro5/allegro.h>
int main(int argc, char **argv)
{
al_init();
ALLEGRO_DISPLAY *display = al_create_display(800, 600);
ALLEGRO_EVENT_QUEUE *queue = al_create_event_queue();
al_install_keyboard();
al_register_event_source(queue, al_get_display_event_source(display));
al_register_event_source(queue, al_get_keyboard_event_source());
ALLEGRO_EVENT event;
while(1) {
al_wait_for_event(queue, &event);
switch(event.type) {
case ALLEGRO_EVENT_DISPLAY_CLOSE:
return 0;
break;
case ALLEGRO_EVENT_KEY_DOWN:
if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE)
return 0;
break;
default:
break;
}
}
return 0;
}
zrbecker@Zach-UVM:~/Documents/Programming$ gcc allegro_test.c -o allegro_test -L/usr/local/lib -lallegro -lallegro_main
zrbecker@Zach-UVM:~/Documents/Programming$ ./allegro_test
./allegro_test: error while loading shared libraries: liballegro.so.5.0: cannot open shared object file: No such file or directory
zrbecker@Zach-UVM:~/Documents/Programming$ ls /usr/local/include/allegro5/
alcompat.h allegro_direct3d.h allegro_opengl.h bitmap.h error.h inline mouse.h timer.h
alinline.h allegro_font.h allegro_physfs.h bitmap_io.h events.h internal opengl tls.h
allegro5.h allegro.h allegro_primitives.h color.h file.h joystick.h path.h transformations.h
allegro_acodec.h allegro_image.h allegro_ttf.h config.h fixed.h keyboard.h platform utf8.h
allegro_audio.h allegro_memfile.h altime.h debug.h fmaths.h keycodes.h system.h
allegro_color.h allegro_native_dialog.h base.h display.h fshook.h memory.h threads.h
zrbecker@Zach-UVM:~/Documents/Programming$ ls /usr/local/lib
liballegro_acodec.so liballegro_dialog.so.5.0 liballegro_main.so.5.0.1 liballegro.so
liballegro_acodec.so.5.0 liballegro_dialog.so.5.0.1 liballegro_memfile.so liballegro.so.5.0
liballegro_acodec.so.5.0.1 liballegro_font.so liballegro_memfile.so.5.0 liballegro.so.5.0.1
liballegro_audio.so liballegro_font.so.5.0 liballegro_memfile.so.5.0.1 liballegro_ttf.so
liballegro_audio.so.5.0 liballegro_font.so.5.0.1 liballegro_physfs.so liballegro_ttf.so.5.0
liballegro_audio.so.5.0.1 liballegro_image.so liballegro_physfs.so.5.0 liballegro_ttf.so.5.0.1
liballegro_color.so liballegro_image.so.5.0 liballegro_physfs.so.5.0.1 pkgconfig
liballegro_color.so.5.0 liballegro_image.so.5.0.1 liballegro_primitives.so python2.6
liballegro_color.so.5.0.1 liballegro_main.so liballegro_primitives.so.5.0
liballegro_dialog.so liballegro_main.so.5.0 liballegro_primitives.so.5.0.1
zrbecker@Zach-UVM:~/Documents/Programming$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment