Sudo Port Installing into XCode 4

Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
I'm pretty sure this is in the right forum. I have been wanting to use the Allegro gaming library to make a game in C++ on Xcode 4. The latest version of Allegro, according to what I am reading, is 4.4.0.1 (correct me if I'm wrong). The guide I read about making allegro an "included" library in XCode said I needed to sudo port install it using the Terminal utility....... just one problem. I don't know how to do that nor did it tell me how. The guide I found on how to do that was completely useless and left me with sudo commands running so that I had to shut them off. :|

Any help on the subject would be greatly appreciated! :D
Thanks,
Cd
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You're looking for the port tool which comes as part of the MacPorts package. To make your life easier, you can even install Allegro through MacPorts (it's version 4.4.2):
Code:
sudo port install allegro
 
OP
C
Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
So I downloaded it from the site now what? I'm sorry I just don't get what your getting at.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Once MacPorts is installed, you use it from the command line. So, the command I posted above is entered in the Terminal window.
 
OP
C
Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
I see what you are getting at with the installation of allegro now but I am stuck on installing macports. Could you give me instructions on doing that please or link me to where I could find instructions. If you can than thank you. :) Thanks for helping me thus far as well!
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
It's a simple install wizard. Download the appropriate installer (they are OS version specific) and simply double click the installer. Get the installer here.
 
OP
C
Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
I'm sorry it just isn't working. :eek: I did like you said and installed macports then entered the code in terminal to sudo port install allegro but I can't use it in XCode. Any thoughts on why this might be or what I might have done wrong?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I don't know what guide you're using but it should have clear instructions on how to add Allegro once it's been installed with MacPorts. If that doesn't work, follow the guide on their wiki here.
 
OP
C
Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
>.< I followed all the steps listed in that link yet it still gives me the same fatal error that it can't find the file allegro.h. :( Was I still supposed to do that first part in the link the

Code:
svn checkout https://alleg.svn.sourceforge.net/svnroot/alleg/allegro/branches/5.0 allegro
cd allegro
mkdir build
cd build
cmake -DWANT_FRAMEWORKS=1 ..
make
sudo make install

in the terminal? I already used macports.....
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
There are two different ways you can install Allegro - using their instructions or through MacPorts. If it was successfully built using MacPorts, then it is installed but likely not in the same directory as the instructions in the wiki. To be honest, I'm not sure where MP installs Allegro.

The wiki page lists instructions for doing it from "scratch" so to speak. Each of those lines is a command you need to enter. Those commands will download Allegro's source, build it and install it.
 
OP
C
Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
I'm pretty sure now that I have it installed. I can't get it to work in Xcode though. I can't include it as a library

Code:
#include <allegro.h>

using C++.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Did you add the Allegro header paths as noted on the wiki page? If you don't, the compiler won't find allegro.h.
 
OP
C
Joined
Aug 21, 2011
Messages
36
Reaction score
0
Points
6
Your Mac's Specs
Late 2010 MacBook Pro 13 Inch
Yea I followed all of it step by step.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top