Questions tagged [allegro5]

Allegro 5 is the fifth version of the Allegro game programming library for C/C++ developers. It is not backwards compatible with Allegro 4. It is distributed freely, and it supports the following platforms: Unix (Linux, FreeBSD, etc.), Windows, OS X, and iOS.

316 questions
25
votes
5 answers

fatal error LNK1169: one or more multiply defined symbols found in game programming

I've been training to use object orientated programming in c++ but I keep getting this error: 1>main.obj : error LNK2005: "int WIDTH" (?WIDTH@@3HA) already defined in GameObject.obj 1>main.obj : error LNK2005: "int HEIGHT" (?HEIGHT@@3HA) already…
Ted
  • 539
  • 2
  • 7
  • 19
11
votes
0 answers

Allegro 5 crashes on calling al_clear_to_color(ALLEGRO_COLOR)

I'm starting at Allegro 5, but soon I got stuck in the second hello-world-like program I'm coding. After some debugging, I concluded that the program crashes when it calls the function al_clear_to_color(ALLEGRO_COLOR). I've tried linking allegro…
Bruno Garcia
  • 111
  • 6
6
votes
2 answers

The procedure entry point _gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll Error

Yesterday I decided to download, install, and attempt to use Allegro 5. I also downloaded Code::Blocks 12.11 w/ the MinGW compiler. I set up everything and installed everything correctly (or so I thought) and tried to run a sample code to see if it…
6
votes
2 answers

Allegro 5 game: game loop that runs at constant speed?

What is the best way to code a game loop in Allegro 5 that always runs at the same speed, and that properly separates drawing logic from update logic? Should I use threads or not? Should I make use of the new Allegro event system?
amarillion
  • 21,899
  • 13
  • 64
  • 80
5
votes
0 answers

Need some help to choose beetween Allegro 5, SDL 1.2, SDL 1.3 or SFML

I won't start a debate about which library is better, it would be against the rule, but more ask a series of technical question. When i ask if there is special technique, just say the name of the technique, or a link. Don't forget, im comparing also…
user1115057
  • 1,715
  • 1
  • 17
  • 20
5
votes
1 answer

How to debug shared libraries compiled with debug information

I'm compiling a program with debug simbols that links to a shared library (liballegro) also compiled with debug symbols. When I try to step into a function of this shared library I can't see any code. file myBin mybin: ELF 64-bit LSB shared object,…
Bungow
  • 250
  • 2
  • 10
5
votes
1 answer

Allegro 5 game: How do I set a resolution that is appropriate for the aspect ratio of the screen?

Using Allegro 5, how do initialize a game in fullscreen mode so that it respects the format of the screen (widescreen 16:9 vs normal 3:4) al_create_display (w, h) Let's you select any ratio you want. For example you can set 640x480, regardless of…
amarillion
  • 21,899
  • 13
  • 64
  • 80
4
votes
2 answers

Performance of running a multithreaded program on a single core by setting affinity?

In short: Under what scenarios can running a multithreaded app on a single core destroy performance? What about setting the affinity of a multithreaded app to only use one core? In long: I'm trying to run the physics of a 2D engine on it's own…
NaturalDre
  • 181
  • 4
  • 9
4
votes
1 answer

D3DERR_INVALIDCALL in d3d->CreateDevice causing window flicker on startup in Allegro 5 D3D program

I'm working on debugging window creation flicker when creating an Allegro 5 Direct3D window with multi sampling enabled. I've narrowed the problem down to window creation in allegro's d3d_disp.cpp source file. However, I can't get any debug output…
4
votes
1 answer

Undefined symbols for architecture x86_64 in C

Today I installed the Allegro game programming library for C and I’ve tried to include one of the header files but when I try to execute gcc -I./include example.c -o a.exe in the terminal, I keep on getting this error: Undefined symbols for…
Calculus5000
  • 417
  • 6
  • 16
4
votes
1 answer

Playing sound file in C with Allegro5

I am trying to play wav file in C with allegro5 and I wrote below code: #include #include #include #include int main(int argc, char **argv){ ALLEGRO_DISPLAY…
Osman Villi
  • 338
  • 2
  • 22
4
votes
1 answer

allegro5 - How to run on Linux?

I set up Allegro 5, and could compile the following code with success: #include #include #include #include #include void error(char *msg) { fprintf(stderr,"%s : %s\n", msg,…
陳文炳
  • 41
  • 2
4
votes
1 answer

allegro 5 performing events at a certain interval

I'm making my first game in allegro 5, it's a snake game. In order to move the snake game I'd want to use a squared grid which I made, so the snake moves at regular intervals. How can I use timers to make an event happen at a certain amount of…
Bugster
  • 1,404
  • 8
  • 32
  • 56
3
votes
1 answer

How do I bundle the Allegro library with a Ubuntu Allegro application?

I got the Allegro dev libraries, wrote and compiled a simple application, and ran it on my computer, and it worked fine. I had a friend test it, but it did not do anything when double clicked. I think the problem is that he does not have the Allegro…
awesomeguy
  • 290
  • 2
  • 10
3
votes
3 answers

How come allegro automatically handles minimize button, but not close button?

Here is a sample from Allegro5 tutorial: (to see the original sample, follow the link, I've simplified it a bit for illustratory purposes. #include int main(int argc, char **argv) { ALLEGRO_DISPLAY *display = NULL; …
Armen Tsirunyan
  • 120,726
  • 52
  • 304
  • 418
1
2 3
21 22