C: compile error subscripted value is neither array nor pointer.And just to clear the air, I would rather not install Boot Camp just to use a c compiler.If it doesnt already come with the system, you can download and install it without any trouble from data-template.
Mac OS X is indeed a POSIX operating system, built on top of FreeBSD, which is a Unix clone. It can run all tools that UnixLinux can run, although since its Unix clone, its a bit modified and often Linux programs need to. If it doesnt already come with the system, you can download and install it without any trouble from data-template here. The only problem is that there might be subtle differences in how MinGW and a true POSIX system behave. I wasnt sure if I coud just use gcc thats built into XCode since the libraries might be different. It can run all tools that UnixLinux can run, although since its Unix clone, its a bit modified and often Linux programs need to be modified to compile on Mac OS X. Ravalons link is not much good, since youll have to do a lot of hunting to find gcc for FreeBSD thats compiled for the correct processor thats contained in your Mac. Read on. Gcc Free Developer AccountXcode, Apples IDE can be installed from the Apple Developer disc or downloaded from their website with a free Developer Account. However, Xcode is merely an IDE - the actual Unix compilers it uses, such as g and gcc are installed along with Xcode. Thus, if you have Xcode already installed, using gcc is as simple as opening up the terminal (ApplicationsUtilitiesTerminal) and entering something like. Using the command I gave previously basically compiles your source into an object file, so it can be linked with any other object files and turned into an executable. No output on the console is good; it means that no errors occured. If you look in the directory where the source is, you should notice a file with the same name, but ending in.o. Thats an object file. Alternativey, you can skip the object file step and directly compile the file into an executable. For Xcode, its as simple as pressing the Build Run button, and a console window should pop up. For handing in the executable, simply dig around in your projects folder-Build-Development-yourexecutablehere. Since MinGW is used to create applications for Windows, In order to get it to run on OS X (for debugging reasons) you need to get data-template wine. To my knowledge, it is the only IDE that uses Aqua on OS X, and it includes gcc. If youre not making GUI apps, you can make the apps using XCodes native GCC to debug your program, then make it with MinGW and submit it.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |