I'm completely new to Mac OS X and the main reason why I bought my new MacBook Pro R15 Retina Edition is to start studying CUDA API.
But I can't get my project build.
For example, when I create a new CUDA project, I go in the project properties and make the following changes :
Compiler for C/C++/Objective-C : LLVM GCC 4.2
Other Linker Flag : -lcuda, -lcudart
Header Search Path : /usr/local/cuda/include
Library Search Path : /usr/local/cuda/lib
When I start adding the necessary libraries in my code, everything runs fine. My code gets no typing error.
When I build the project, I get linking errors (paths shortened and message broken up for readability):
Ld /my_test_project/Build/Products/Debug/test normal x86_64 cd /Users/Admin/Documents/test setenv MACOSX_DEPLOYMENT_TARGET 10.7 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-arch x86_64
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-L/my_test_project/Build/Products/Debug
-L/usr/local/cuda/lib -F/my_test_project/Build/Products/Debug
-filelist /my_test_project/Build/Intermediates/test.build/Debug/test.build/Objects-normal/x86_64/test.LinkFileList
-mmacosx-version-min=10.7
-lcudart
-lcuda
-o /my_test_project/Build/Products/Debug/test
ld: file not found: @rpath/CUDA.framework/Versions/A/CUDA for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
What's weird, is that when I go to the described path, I see the CUDA executable. The file is there!
When I use the cuComplex.h, which uses the library, every single mathematical expression (such as log, cos, sin, etc...) is an "undefined variable". However, the cuComplex.h library has inside it the library.
The driver, the SDK and toolkit are well installed and everything works like a charm. I can get the SDK examples working. But I think I miss a detail to get the whole thing working.