|
Back for more... |
Number Six
Member #3,912
October 2003
|
Well i've been gone for about 10 years but here I am again Really happy to see the Allegro.cc is still here, and frankly stunned I remembered my username and password. So i've not used Allegro in all this time and things have changed quite alot. I've compiled and installed Allegro successfully on my Mac (I think!) but I'm damned if I can remember how to even compile/link my program with gcc and from a look of things that process is not quite the same as I vaguely remember it anymore. Can anyone point me in the right direction? (God I'm a noob again...:P) --------------------------------------- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you're just using gcc, it's fairly straightforward. gcc -Wall -Wextra -o proggie.exe -I $INCLUDE_DIR source1.cpp source2.cpp -L $LIB_DIR -l$ALLEGRO_LIBRARY Just replace the $VAR with the appropriate directory or library. -I sets the search directory for includes Additionally, you can specify -c to only compile objects and then link later, using your produced *.o files and libraries. Static link needs a whole bunch of other libraries. I'm not sure what they are on OSX. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Number Six
Member #3,912
October 2003
|
Thanks for that - it got me off the ground. Unfortunately I seem to have a problem with one of the header files alplatf.h. Compiler says it is missing. When I look where it is supposed to be there is a alplatf.h.cmake file - which suggests somehow it never got created. I'm not sure on the way forward from here. Do I start over from scratch? - do I run cmake again? Any help much appreciated --------------------------------------- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
alplatf.h is generated by the build process. Did you run make and make install? Where did you install allegro 5 to? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Number Six
Member #3,912
October 2003
|
I followed the build instructions included in the Allegro files so I: 1. Extracted the Allegro 5.2.1.1 files into a directory. All of this seemed to succeed but I don't know where make install put everything. I was instead attempting to use the includes and lib files created in the build directory in my gcc invocation. However that one seems to not be there - There is only a version in a folder pertaining to iOS according to a system wide search which I assume is not suitable for Mac development use. It seems the cmake may not have been as successful as it seemed. I may have to start over from scratch. --------------------------------------- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Those are the correct directions to install allegro. I don't know if cmake-gui comes on OSX, but you can set CMAKE_INSTALL_PREFIX to the directory where you want allegro to be installed. I think you set it like so : cmake -G "GENERATOR" -DCMAKE_INSTALL_PREFIX=/usr/local ..
Number Six said: I was instead attempting to use the includes and lib files created in the build directory in my gcc invocation. However that one seems to not be there - There is only a version in a folder pertaining to iOS according to a system wide search which I assume is not suitable for Mac development use. It seems the cmake may not have been as successful as it seemed. I may have to start over from scratch. This will fail because the header install process copies platform specific headers into the install directory that aren't in the build folder. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|