|
Allegro Xcode Error Compiling |
motyas
Member #16,305
April 2016
|
Hello guys! |
Peter Hull
Member #1,136
March 2001
|
Hi motyas, Try: #include <allegro5/allegro.h> int main(int argc, const char * argv[]) { al_init(); ALLEGRO_DISPLAY* display = al_create_display(640, 480); al_clear_to_color(al_map_rgb(0x40, 0x40, 0x80)); al_flip_display(); al_rest(10.0); al_destroy_display(display); return 0; } Run it! Hope that helps.
|
motyas
Member #16,305
April 2016
|
Thanks Peter, |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Please tell us what errors you are getting, and at what step they are occurring. Use Google Translate if you need 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 |
motyas
Member #16,305
April 2016
|
Yes, i forgot it! Undefined symbols for architecture x86_64: linker command failed with exit code 1 (use -v to see invocation) // and this is the second I guide me by this video (only the first part of the video) and the homebrew page: https://www.youtube.com/watch?v=7miwnp8iDm8 // The tutorial http://brew.sh/index.html // Homebrew |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You need to link with allegro_main. Peter Hull said: 4. Add /usr/local/lib/liballegro.dylib and liballegro_main.dylib to the project The linking order may be important too. 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 |
Peter Hull
Member #1,136
March 2001
|
Edgar Reynaldo said: You need to link with allegro_main. agreed. Quote: The linking order may be important too. Don't think so in this case. I've attached a 'simple' project I just made up to check the necessary steps. See if this works for you.
|
motyas
Member #16,305
April 2016
|
But where i need to put the .dylib files? Also i find this in the NET: http://stackoverflow.com/questions/32641673/undefined-symbols-for-architecture-x86-64-in-c is in english and i didn't understand what says (a bit), and when mention something of the terminal my head did: "boom"! Someone speak english here? hahahah, the hope is the only thing that i will never miss c': |
Peter Hull
Member #1,136
March 2001
|
In this one ls /usr/local/lib/liballegro* from the terminal and brew info allegro Tell us what you see. [edit] Also when it says 'library search paths' in XCode it means path to a directory, not a file. That's why you get the 'ld warning directory not found for option -L' message.
|
motyas
Member #16,305
April 2016
|
I can see this: ==> Dependencies I put the ls /usr/local/lib/liballegro* and tells me that: /usr/local/lib/liballegro-static.a |
Peter Hull
Member #1,136
March 2001
|
Looks like it may not be installed properly. I don't have any of those -static files. I am not sure where they have come from or what version. You need to look a bit further up, do you see this (if it is installed) $ brew info allegro allegro: stable 5.2.0 (bottled), HEAD C/C++ multimedia library for cross-platform game development http://liballeg.org/ /usr/local/Cellar/allegro/5.2.0 (145 files, 2.0M) * Poured from bottle From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/allegro.rb ==> Dependencies or (if it isn't) $ brew info allegro allegro: stable 5.2.0 (bottled), HEAD C/C++ multimedia library for cross-platform game development http://liballeg.org/ Not installed From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/allegro.rb ==> Dependencies
|
motyas
Member #16,305
April 2016
|
allegro: stable 5.2.0 (bottled), HEAD This is the thing that i see. Maybe i need to uninstall everything and reinstall it again. Do you know how uninstall allegro and it's libraries? or do you know a tutorial in which tells how? Thanks very much for your help I reinstall everything but i got the same errors... I don't know what i need to do :/ |
Peter Hull
Member #1,136
March 2001
|
Try brew remove allegro brew update brew install allegro
|
motyas
Member #16,305
April 2016
|
I go to try it, |
Peter Hull
Member #1,136
March 2001
|
I sent you a PM.
|
motyas
Member #16,305
April 2016
|
Nice! |
|