Antonio Bleile wrote:
> Hi,
>
> I'm currently writing a library which uses some OpenSG stuff.
> The library is static and within the library I create FBO's.
> I took my tested code from my small stand-alone application
> and pasted it into the library code, so the code itself should
> be ok. 
> The problem now is, when I use the library I get wild crashes
> inside the OSGSystem library. I'm suspicious about the fact
> that I'm creating a static windows library. I have successfully
> used dll libraries which used OpenSG so far. I'm using VS.NET
> 2005 and a recent OpenSG dailybuild. Here are my compiler flags
> for the library:
>
>   
[snip]
> Do you have any ideas what might be wrong???
>   
Be aware that unreferenced compilation units are optimized away when 
using static libraries. This does not happen with dlls/exes. (So if you 
have a cpp file that only registers itself in a factory, it might not be 
executed unless there is a call from main() into the function itself.)  
There is a pattern called NiftyCounter that works around that.

There could also be a few similar issues with initalization order. Are 
you sure that you don't call anything (important) in OpenSG before 
osgInit()?

There might be something else too, do you have a call stack?

Cheers,
/Marcus


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to