I have Cg installed to /Library/Frameworks/Cg.framework
. It looks like this on disk:
My XCode 3.2.6 project has Library/Frameworks
as a Framework Search Path and -Framework Cg
in "Other Linker Settings" but when I try to #include <Cg/cg.h>
it can't find the file. If I directly add /Library/Frameworks/Cg.framework/Headers
to my "Header Search Paths" I can `#include ' but it fails to link with error "Framework not found Cg".
I don't really understand what a Mac Framework is - is it anything special or just a regular directory? It seems as if Xcode simply doesn't understand /Library/Frameworks/Cg.framework
is a framework for some reason.
I'm not sure if this is related: https://stackoverflow.com/questions/5293940/xcode-3-2-6-stops-looking-in-library-frameworks
Any help understanding what's wrong would be appreciated.
I tested a simple test from the command line:
test.cpp
#include <Cg/cg.h>
void f()
{
CGcontext context = cgCreateContext();
}
Just running "gcc -c test.cpp" succeeds (-c says don't link). I also ran "gcc -M test.cpp" (list dependencies): /Library/Frameworks/Cg.framework/Headers/cg.h
So the framework seems fine... how can running gcc without passing any search paths work, but XCode can't see the framework when it calls gcc?