Hi,

I was wondering is anyone else has had experience with this problem.

I have written a DLL of my own, which is written in C++, and makes heavy use of 
OSG. It is written so that any application that needs to display a scene can 
simply link to this DLL:

OSG <-- MyDLL <-- App

This works fine, as long as the App is native C++. The App simply links to 
myDLL, and the OSG stuff comes with it.

However, when try to link to MyDLL from a C++\CLI App, I get a whole host of 
linker errors (unresolved external symbols), all referring to the OSG stuff.

If I link my C++\CLI app directly to the OSG libraries, the errors go away. 
However, I am curious as to why it couldn't find the symbols in MyDLL.

I thought that perhaps there was some C++\CLI quirk that prevented those 
symbols from 'carrying over'. To test this, I made two separate DLL projects, 
which I'll just call DLL_A and DLL_B, and tried linking them as follows:

DLL_A <-- DLL_B <-- C++\CLI App

And this works fine! So it appears to only be a problem with the OSG libraries, 
but I can't seem to figure out what that problem is. If I could, then maybe I 
could figure out how to build them differently.

Note: I am not 100% sure that this is a difference between native and managed 
C++. All I can say for sure is that I've built several native C++ apps that 
link to MyDLL without any problems. This C++\CLI project that I'm having 
trouble with is the first, and only, managed project that I've tried.

Thank you!

Cheers,
Frank

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=21127#21127





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to