Good evening Allegro community!
To introduce myself first: my Name is Paul (19 at this time) and I'm from Germany.
I've been programming in QB and Assembler since 2001, learned some PHP later (see: http://mosfetkiller.de/) and finally learned C like 2 years ago.
Thanks to Allegro, I rediscovered the joy of game programming again. :-)
Nevertheless, I am definately not a C expert yet.
I wrote a basic RPG engine several days ago, which worked so far.
But it was just one huge "main.c" file, so I decided to split it in parts like "video.c", "logic.c" and so on.
Unfortunately I have some serious problems with my header files.
Since every module ("main.c", "video.c", "logic.c", ...) accesses functions of the Allegro library, I have to include "allegro.h" in every single header file of all the modules.
But when I compile, I get a huge amount of "multiple definition" errors.
What am I doing wrong?
What is the right way of using header files?
Believe me, for the last two days I tried everything possible to get the whole thing to work, but I just couldn't make it.
I really hope, someone here can help me. Thanks!
Greetings from Germany,