Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Compile allegro with g++ at Debian

This thread is locked; no one can reply to it. rss feed Print
Compile allegro with g++ at Debian
siery51
Member #16,153
January 2016
avatar

Sorry for next newbie question but there seems to be not to much info about using Allegro with Debian Jessie at web.^^
Anyways, after i build allgro 5 i had no problems to compile simply programs. But when i compile and try to run a game i write under windows i got segmentation fail. Thats the only response I'm getting when i run it:

$./bin/super-pong
Segmentation fault

I use thous libraries ttf, image, audio, acodec and primitives. So i compile it by g++ using pkg-config to attach librarys and flags: -I/usr/include/allegro5 -L/usr/lib -lallegro.

Do i need to supply some extra files to my project directory?

Thanks, Siery.

//

Don't be afraid of doing new things. Professionals build the Titanic amateurs build the Ark.

Peter Hull
Member #1,136
March 2001

If you've compiled it then you don't need any more files in the project directory. You've got a run-time error.
To diagnose you could try re-compiling with flags -g -O0 and running it in gdb. When it crashes, it should show you where it got up to.
In my experience if you're converting from Windows the 2 things to look out for are path separators (\ on Windows but / on Linux) and case-sensitive file names - Windows will load files even if you haven't matched the case exactly.
Good luck,
Pete

siery51
Member #16,153
January 2016
avatar

Thanks, I been learning about gdb debugger and I located the source of my problem. But I still can't understand whats wrong :/. But I'm going to write about it in 'Programming Questions' section.

//

Don't be afraid of doing new things. Professionals build the Titanic amateurs build the Ark.

Bruce Pascoe
Member #15,931
April 2015
avatar

Regarding path separators: best practice is just to use / everywhere. Nearly all platforms will recognize it, regardless of what the native path separator is.

Go to: