Compiling the ColladaRT project

Compiling Collada RT
Hi there
When compiling the Collada RT project( both VC++7 and VC++ 8 ), I get the following linking errors in debug mode( I have not tested the release option yet):

Linking…
Creating library …/…/bin-dbg/COLLADA_RT_VIEWER.lib and object …/…/bin-dbg/COLLADA_RT_VIEWER.exp
libcfxLoader_d.lib(cfxAnnotate.obj) : error LNK2019: unresolved external symbol __imp__cgCreateEffectAnnotation referenced in function “public: virtual bool __thiscall cfxAnnotate::apply(class cfxEffect const *)” (?apply@cfxAnnotate@@UAE_NPBVcfxEffect@@@Z)
libcfxLoader_d.lib(cfxGlPipelineSetting.obj) : error LNK2019: unresolved external symbol __imp__cgCreateStateAssignmentIndex referenced in function “public: __thiscall cfxGlPipelineSetting::cfxGlPipelineSetting(class cfxPass *,char const *,int)” (??0cfxGlPipelineSetting@@QAE@PAVcfxPass@@PBDH@Z)
…/…/bin-dbg/COLLADA_RT_VIEWER.exe : fatal error LNK1120: 2 unresolved externals

Note that I have installed CG 1.5 beta. What’s the problem?
-Ehsan-

Note that I have installed CG 1.5 beta. What’s the problem?
The problem could be that you installed the CG beta and not the final CG 1.5, which you can get here. Let me know if that helps.

Aside from that, you need to make sure to build all of RT’s dependencies. You need to build DOM, FX, and bullet (bullet is from the “external-libs” folder) before you can build RT. It’s a huge pain, but unfortunately I haven’t had time to fix it yet.

Yes, it solved my problem :o I also tested some models. There’s a problem in their lighting( maybe shininess or nomal vectors of the model ). Here you can see the dragon model in ColladaRT:
http://zehneziba.ir/screenshots/dragon.jpg
Note that they look OK in ColladaLoader.
-Ehsan-

I’m also having trouble compiling the ColladaRT. sthomas, you mention that one needs the DOM, bullet and FX. I’ve found the bullet and I’ve got the Dom, of course, but I cant find FX. Is this its full name? Where can I find this one? Maybe this is a dumb question, but is there a way I can get my hands on a compiled version of ColladaRT, so I dont have to fuss with compiling all this stuff?

Thanks,
John

The installer for the last official release of the Collada DOM (from April, available here) includes pre-built binaries for RT. That’s old code though, so I’m going to include a full description of how to get RT building from the code on SourceForge, for anyone who needs it.

Make the directory you want to install to, then open a command line and cd to that directory. You need to checkout the DOM

svn co https://collada-dom.svn.sourceforge.net/svnroot/collada-dom/COLLADA_DOM/trunk COLLADA_DOM

the external libs folder (which includes bullet)

svn co https://collada-dom.svn.sourceforge.net/svnroot/collada-dom/external-libs external-libs

Collada FX

svn co https://collada-dom.svn.sourceforge.net/svnroot/collada-dom/COLLADA_FX/trunk COLLADA_FX

and Collada RT

svn co https://collada-dom.svn.sourceforge.net/svnroot/collada-dom/COLLADA_RT/trunk COLLADA_RT

You need some environment variables defined before you can build (very dumb, I know): COLLADA_EXTERNAL_LIBS_LOCATION should point to the external-libs folder, COLLADA_DOM_LOCATION should point to the DOM folder, and COLLADA_FX_LOCATION should point to the FX folder. Then build the DOM (the static libs, not the DLL), bullet, FX, and RT in that order via the provided .sln files, assuming you’re on Windows.

The only way to run RT is by calling it on the command line with the name of the file you want to open.

Steve

This question doesn’t refer to compiling the project, since I have compiled it before. As you suggested, I downloaded the latest version of Collada with Cygwin. Unfortunately, I can’t open the VC++7 project. When I open COLLADA_DOM.sln file with VC++ compiler,it reports the following errors:

failed to open $root_path/dae.vcproj
failed to open $root_path/dom1.4.vcproj

And $root_path is the path of the sln file.
both files exist there, but VC++ can’t open them.
I downloaded the files again, But it didn’t solve my problem.
-Ehsan

I just tried. I was able to open the files fine. The project files are for Visual Studio 7.1 (2003), not 7 (2002). The folder names are misleading.

What exactly do you mean by this? Do you just mean that you used a Cygwin shell to download the code from SourceForge? That should be fine, although I usually use a standard Windows command prompt.

What exactly do you mean by this? Do you just mean that you used a Cygwin shell to download the code from SourceForge? That should be fine, although I usually use a standard Windows command prompt.[/quote]
Yes, I use Cygwin shell instead of Windows command prompt. 3 years ago, Fabrice Jaubert( OpenML moderator ) suggested me to use Cygwin instead of Windows command prompt, So I started to work with Cygwin shell :wink:
-Ehsan- :slight_smile:

Using a Cygwin shell should be fine of course.

I’m not totally sure how to help you further. I just updated to the svn head and opened the 2003 .sln, and it worked fine. Let me know if there’s anything else you’d like me to try.

Steve

Thank you. I’ll try to install VC++ 2005 and compile the VC++ 8 project.
-Ehsan-

Hi sthomas,

I’ve finally gotten around to trying to compile this stuff again. When I try to compile Collada FX, I get an error telling me that it cannot find “Cg/cg.h”. Any idea where I can get this one?

Thanks!
John

Whoops, I forgot to mention in my instructions that you need to have Nvidia’s CG installed, which you can get from here: http://developer.nvidia.com/object/cg_toolkit.html