Game Development Community

Cg.framework adding to 1.4.0 Xcode project problem....?

by Jason Peterson · in Torque Game Engine · 07/16/2006 (2:29 pm) · 5 replies

I have been trying to implement the upgraded water block shader resource....

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10357

Xcode does not seem to include the Cg.framework in the build. I have added the Cg.framework to the project and made the file changes as in the resource. But when I build I get:

Cg/cg.h: No such file or directory
Cg/cgGL.h No such file or directory

Is there something else I need to add or change in the project? The example Cg Xcode projects build and run just fine. Are there custom torque build scripts somewhere that I need to edit?

Thanks for any help,

Jason

#1
07/24/2006 (4:26 pm)
There is a lovely manual for Xcode, available under the 'Help' menu, that has more detailed instructions, with screenshots and all.

In general, you probably need to make sure that the framework was added to your target, and that the header search paths & framework search paths are set up. You *will* need to add a framework search path if your framework is not installed in /System/Library/Frameworks/ .

Share and Enjoy
/Paul
#2
09/21/2006 (8:50 am)
Been stuggling with this one for over 30 h now, and i am short of hair on my head now.

Got it to compile all the way to the last linking, but there it stops and warns me that CG is not prebound, then another warning telling me that prebind is ignored because MACOSX_DEPLOYMENT_TARGET envrionment variable greater or equal to 10.4, and then the big bad red cross saying that i have Undefined symbols:

_cgCreateContext
and so forth...
#3
09/21/2006 (10:36 am)
@Alex,

I wish I could help. I just went through the process and it worked for me.

I downloaded the Tiger files from Nvidia and installed them.
I added the frameworks to my project.
I downloaded and installed the files from the resource.
I did a "Clean All" and "Build".
I made the changes Eric Harg pointed out. (Three edits.)
And rebuilt it and it worked.

I running Xcode 2.4, OS X 10.4.7 and I was working with v1.4.2R1 with file torque_xcode_2_2_UB from CVS.

At least I assume it worked the water has a milky white reflection on top of it now in starter.fps. I'm not sure I like the default effect but it is doing something. I wish I could be more help other than to say it worked for me.

When you added the Cg framework did you make sure you added it to your target build specifically? I would remove and re-add the Framework again (assuming you haven't) and add it to all the builds when prompted - or at least all the torque builds.

=Tod
#4
11/26/2006 (2:51 am)
You know what's strange? I made the changes for Alex some time ago now (successfully) and then upgraded to TGE 1.5.
I gave it a try yesterday night and I got the same troubles than he experienced... grrr.

STef
#5
11/26/2006 (12:47 pm)
Got it!
The problem is about Nvidia naming convention. Cg.framework should be cg.framework.
It is only a matter of capitalized letter.