01-21-2009, 08:53 PM #1Simplest Instructions for Compiling
Hi. I am looking for the simplest instructions to compile an executable either using Xcode or from the terminal. I downloaded a sample C program and I want to compile and test it. I don't know where to put the header file that it needs (what directory to put it in) or how to tell gcc where to look (from the Terminal). If I could figure out how to compile in Xcode, that would be cool, because I assume I could get away from typing long path names and stuff.
I imagine this question has been answered in another thread, but I couldn't find it. I will be happy if you can direct me to such a thread, or post the answer here.
01-21-2009, 11:34 PM #2
- Member Since
- Jan 06, 2008
Easiest way in XCode would be to create a new C application, then import all your files into your new project. As far as the proper location of the header files and what not, just have a look at includes at the top of the .c files, but usually they'll be in the same directory as your main.c and all your other files (especially for a small/simple application)
If you'd rather use g++ instead and plan to modify that application, you might want to look into makefiles
01-29-2009, 12:08 AM #3
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By Mr. D in forum Movies and VideoReplies: 2Last Post: 11-16-2014, 09:58 AM
By RangerJet in forum Movies and VideoReplies: 4Last Post: 10-04-2013, 12:37 PM
By berrill in forum Movies and VideoReplies: 6Last Post: 01-02-2011, 09:46 AM
By justswitched2 in forum Switcher HangoutReplies: 1Last Post: 12-28-2010, 02:15 PM
By HiFreq47 in forum Movies and VideoReplies: 6Last Post: 10-29-2010, 01:27 PM