![]() |
|
Trying A5 on MacOS without Xcode |
nonpro
Member #12,577
February 2011
|
Hello, I'm learning C++ and trying out some game libraries, so I decided to give Allegro a spin. I've copied the example from http://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays into a file and am trying to compile it with: g++ main.cpp -o main -Wall -L/usr/local/include -L/usr/local/lib -lallegro_main -lallegro (I have a makefile etc but this is what I've narrowed it down to.) This compiles without errors, but when I run the executable I get: dyld: Symbol not found: __al_mangled_main What am I doing wrong? The necessary files should be present: $ ls /usr/local/lib/liballegro.* $ ls /usr/local/lib/liballegro_main.* |
Evert
Member #794
November 2000
![]() |
For C++, your main() function must be (EDIT: Ok, I see that the tutorial has this. Make sure you do too). As an aside, you should set up and use pkg-config rather than passing the library flags to the compiler directly. |
azerty_damned
Member #12,589
February 2011
|
Check this: |
|