Ok, I'm probably missing something very simple here, but in trying to compile code that uses openmp in xcode, I have selected my compiler as gcc 4.2, and checked the 'Enable OpenMP Support' check box in the build settings, but when I try to build, I get the error, "omp.h: No such file or directory". This is weird because it compiles just fine from the command line (using either gcc44 or nvcc, with appropriate tags). So is there something simple that I'm missing here? All I'm doing is creating a new c command line utility, and throwing "#include <omp.h>" up at the top of the main.c, and try to compile, and I get the error. Xcode is 3.1.3.
ok, scratch that, creating a new project works. I am getting the error in another project though, and have the two flags set. I have custom search paths set for this project. Is it possible that they could be interfering?
Negative. In console the code compiles just fine. To make it even stranger, I just created a fresh command line utility project, set pretty much all the build options to the same as I have in the troubled project, and dropped in the #include , and the sucker built just fine. so there's something odd about the specific project file, I think...
Ok, it looks like it's got something to do with the project template I built for the this project. I'm using nvidia's cuda, and set up a project template that works with the cuda libraries, & etc, but for some reason projects from that template can't find omp.h. I have the project template in ~/Library/Application\Support/Developer/Shared/Xcode/Project\Templates/CUDA\Pro jects.
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
xcode 3.1 and openmp
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.