Hi Johannes,
On Mon, Aug 31, 2009 at 3:43 PM, Schaefer
Johannes<[email protected]> wrote:
> I tried a simple commando line program to test opensg.
> #include <iostream>
> #include <OpenSG/OSGConfig.h>
> #include <OpenSG/OSGNode.h>
> #include <OpenSG/OSGSimpleGeometry.h>
> OSG_USING_NAMESPACE;
> using namespace std;
> int main()
> {
> cout << "OSGTEST" << endl;
> NodePtr scene = makeTorus(.5, 2, 16, 16); // crashes here
> return 0;
> }
>
> I have configured all include paths, additional libs... the program compiles
> fine, but it crashes at line 10 with a unhandled exception.
> I don't know why. The examples an tutorial projects have a similar behavior.
You must call osgInit(argc, argv) before using any of the OpenSG
functions (with a very few exceptions). Could you try adding a call to
osgInit() in your example program and try again? This doesn't explain
though why the tutorial projects fail, those should call osgInit()
properly. The other common problem on Windows is mixing release/debug
dlls, this might explain what happens with the tutorial projects in
your case -- could you double check your solution/project settings?
HTH,
Ákos
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users