Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cfshelor

macrumors newbie
Original poster
Nov 4, 2011
13
0
I recently upgraded to Lion and have discovered that I can no longer run gcc from the command line. If I try to access the gcc in the developer area from the command line, it cannot locate any of the standard libraries. (Yes, I must have access to gcc from the command line as I am developing MPI programs that will not link with Xcode unless someone can tell me how to fix that!)

If someone could point me to instructions on how to run OpenMP and MPI from Xcode 4, that would be extremely helpful as well!!

Thanks for any suggestions.

Charles
 
You need to install Xcode 4.xx, the gcc compiler is not included in lion.
Its available for free on the app store.

Im able to compile OpenMp C/C++ stuff from the command line (using a makefile).
 
gcc returned, but #include <omp.h> now errors

Installing Xcode 4.2 returned gcc to /usr/lib. However, my OpenMP include file line: #include <omp.h> now returns 'omp.h' file not found error. This statement works fine in Xcode 3.5.x and 3.6.x. Does anyone know how to make this work in Xcode 4.2?

Thanks!

Charles
 
In Xcode 3.6 there was a check box in the build controls in the project settings. I cannot find the equivalent in Xcode 4.2, but assumed the project settings would have been copied over from the Xcode 3.6 settings. Where do I set that flag in Xcode 4.2?
 
You can change the compiler to LLVM GCC 4.2 and turn on "Enable OpenMP Support" in Build Settings.

After that I can build and run a simple OpenMP program (just for testing) even though Xcode still complains "omp.h file not found". Anyone got a solution for the "file not found" thing?

Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.