Hello. I'm a fairly experienced programmer, but only in VisualBasic/RealBasic. I have a C program that I need to run. I've learned enough C that I can muddle through the code and more or less see what it's doing, but I haven't been able to get it to run in XCode, and I see from another thread here that I should probably be using a command-line compiler and the terminal. I googled GCC, but couldn't even figure out which file was the C compiler, or how to download it, let alone run it, let alone use it to run the program in question.
The author of the program informs me that he used a command-line compiler in Linux called g++. I saw a file named "g++" at the GCC site, so I'm guessing that might be a direction to pursue. But the idea of spending hours fumbling around in the dark is pretty depressing, so I'm hoping someone here will have the time to point me in the right direction. To recap: I have a C program, along with some headers and includes plus some stub files, everything I need (according to the author) to run the program. I know I'm supposed to gather these files together in the same directory as the compiler, and then type the magic words, which in linux/g++ are said to be
g++ -o programname programname.cpp
I'm guessing that -o is an instruction to the compiler and that the other two terms are the names of the source code and the eventual compiled program. If I could get GCC downloaded and running, then hopefully I could use the GCC manuals etc to eventually get everything working. As for XCode, I've read through the XCode manuals and done the beginner tutorials, but when I try to use XCode to run this program, it compiles successfully, but it appears to just compile the boilerplate that XCode installs when you choose "New Project," not the actual code from the program itself.
It's a pretty dull request, I know, but can anyone help get me up to speed on getting XCode or GCC (or any better alternative) up and running to the point where I can compile and run this program on Mac 10.3? Thanks in advance.
The author of the program informs me that he used a command-line compiler in Linux called g++. I saw a file named "g++" at the GCC site, so I'm guessing that might be a direction to pursue. But the idea of spending hours fumbling around in the dark is pretty depressing, so I'm hoping someone here will have the time to point me in the right direction. To recap: I have a C program, along with some headers and includes plus some stub files, everything I need (according to the author) to run the program. I know I'm supposed to gather these files together in the same directory as the compiler, and then type the magic words, which in linux/g++ are said to be
g++ -o programname programname.cpp
I'm guessing that -o is an instruction to the compiler and that the other two terms are the names of the source code and the eventual compiled program. If I could get GCC downloaded and running, then hopefully I could use the GCC manuals etc to eventually get everything working. As for XCode, I've read through the XCode manuals and done the beginner tutorials, but when I try to use XCode to run this program, it compiles successfully, but it appears to just compile the boilerplate that XCode installs when you choose "New Project," not the actual code from the program itself.
It's a pretty dull request, I know, but can anyone help get me up to speed on getting XCode or GCC (or any better alternative) up and running to the point where I can compile and run this program on Mac 10.3? Thanks in advance.