RE: make, xcode and the such

Joined
Jan 25, 2012
Messages
14
Reaction score
0
Points
1
RE: make, xcode and the such

Hello everyone, its my first post -> decided to join, since google reidrects me here most of the time anyway :)

I just got a macbook pro 2011 couple months ago -> i'm sailing from windows/ubuntu world. Although, I really love Mac OS X and my new laptop, but xCode feels really awkward (to say the least)...looks really nice though.

So, i have several issues i can't wrap my head around.

1. I want to run commands like "make". The forums and google revealed a general response -> install xcode. Well, I have (4.2.1), but when i run "make" or "make all", this is the output:
-bash: make: command not found

2. I created a command line C++ project with xcode, did my stuff, the next day when I open a myApp.xcodeproj , a window pops out with "No Editor"...where did the nice IDE I used a day ago went to? Like the directory navigator, debug area and all the other nice features?

That is all i have for now, sorry if its nooby question...but i am n00b with mac :)

Thank you in advance :)
 

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)
Welcome!

First off, you don't have to use Xcode by any means. Like Linux and Windows, the choice is yours. Find an editor that suits your needs and enjoy.

As for your questions:
1. The development tools includes everything you need to develop applications since this is what Xcode is using to build your applications. Assuming Xcode was installed properly, make should be in your path. Let's do a quick check:
Code:
whereis make
It should be located in /usr/bin/
2. I'm going to have to leave this one to the Xcode users here. The C languages scare me so I avoid Xcode. ;)
 
OP
T
Joined
Jan 25, 2012
Messages
14
Reaction score
0
Points
1
Hey,

Thing is, if you google things like "how to install gcc on mac" or "how to get make command to work" or any of the similar questions, the respond is the same -> get an xcode. So, naturally I thought that the xcode comes with all these things. But i can't find them is binaries folder or anywhere else and they're not installed with xcode installation. Oh well :S Thanks for reply :)
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
That "binaries" folder won't be found because it's hidden. You need to explicitly look for it in the 'Go/Go to folder' menu item.
Xcode should be on your install disk.
Try this in Terminal: echo $PATH
What does this return?
 
OP
T
Joined
Jan 25, 2012
Messages
14
Reaction score
0
Points
1
i'm sorry, what's a go/go folder?

yes, i have installed xcode already, although still none of the commands i want, don't work (says command not found for example when i ran "make" on makefile).

this is what the echo $PATH returns:

/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

I don't believe i altered the path, so that should be original.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
What I meant is in Finder use the Go menu, select Go to Folder and type '/bin' without the quotes. This will show you the hidden folder. There are several.
That is not the original $PATH. OS X does not come set up with an opt directory by default.
Here is mine, which is just after a system reinstall: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
make should be in /usr/bin. If it's not there something's wrong.
The only thing I know of which installs /opt is MacPorts. Do you have that installed?
 

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)
If you have MacPorts installed and working, you have the proper build tools since MP depends on them.

make is located in /usr/bin (it's actually a symlink to /usr/bin/gnumake) so if it's not there, check to see if gnumake exists. If it doesn't, try reinstalling Xcode.
 
OP
T
Joined
Jan 25, 2012
Messages
14
Reaction score
0
Points
1
2cradom & 2vansmith:

Yes, forgot about macports -> i installed it almost as soon as got my mac,
but didn't use it much. I browsed the bin folder, yes, i don't have make there (just mv and mkdir commands on "m").

However, I browsed around and found a whole bunch of executables, including make and gnumake, in Developer/usr/bin

So, it should work if i'll add this folder to my PATH? With something like, export PATH=$PATH:/Developer/usr/bin ?
 
OP
T
Joined
Jan 25, 2012
Messages
14
Reaction score
0
Points
1
awesome, i decided to try to add the folder to PATH, now i have make commands + some other really nice ones :)

thank you guys very much for your help :)
 

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