[osg-users] [osgPlugins] osganimation plugin and static linking

122 views
Skip to first unread message

Kazimir De Paris

unread,
Nov 21, 2009, 9:56:51 AM11/21/09
to osg-...@lists.openscenegraph.org
Hi there,

I am very new to OpenSceneGraph and I apologize in advance if this question already has an answer in this forum.

I am using the static version of OpenSceneGraph, under windows. I recompiled the sources with the OSG_LIBRARY_STATIC flag.
I compiled and tested the osgstaticviewer, and it works fine.

Now, I recompiled the osganimationviewer example in a separate project. I added the following macros, as specified in the osgstaticviewer project :
USE_OSGPLUGIN(ive);
USE_OSGPLUGIN(freetype);
USE_OSGPLUGIN(osg);
//USE_OSGPLUGIN(osganimation);
USE_OSGPLUGIN(rgb);
USE_OSGPLUGIN(OpenFlight);
// include the platform specific GraphicsWindow implementation.
USE_GRAPHICSWINDOW();

It does compile if I comment USE_OSGPLUGIN(osganimation), but then the program tries to find the osgAnimationd.dll and osgdb_osganimationd.dll (I saw this thanks to OSG_NOTIFY_LEVEL set to DEBUG).
It fails to link if I leave the USE_OSGPLUGIN(osganimation) macro on, and says :
AnimtkViewer.obj : error LNK2001: unresolved external symbol _osgdb_osganimation

I have osgdb_osganimationd.lib (static version) in my list of Additional Dependencies...

Once again, I am sorry for that newbie question, but I thought that it could save me several hours and take only a couple of minutes to answer.
So has anyone successfully compiled and run a "osgstaticanimationviewer" ? :-)
Thank you in advance for your answers,
Cheers,
Stratboy61

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

_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Kazimir De Paris

unread,
Nov 24, 2009, 1:57:09 PM11/24/09
to osg-...@lists.openscenegraph.org
Hi there,

Well, I ended up making it work !
As a matter of fact, it came to me all of a sudden that I could directly embed the osganimation plugin source code into my project. And as the plugin is only one single source file (ReaderWriter.cpp), it was not a big deal...

Anyways, all is working now, and I hope that I can move forward quick.
Cheers,
Stratboy61

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=20287#20287

Robert Osfield

unread,
Nov 25, 2009, 4:37:19 AM11/25/09
to osg-...@lists.openscenegraph.org
Hi Kazimir,

On Tue, Nov 24, 2009 at 6:57 PM, Kazimir De Paris <strat...@gmail.com> wrote:
> Well, I ended up making it work !
> As a matter of fact, it came to me all of a sudden that I could directly embed the osganimation plugin source code into my project.  And as the plugin is only one single source file (ReaderWriter.cpp), it was not a big deal...

Is your application opensource under the same license as the
osgAnimation plugins (i.e. OSGPL)? If not then just copying code is
not legal and is something you should refrain from doing.

To link in plugins use the macro's as shown in the osgstaticviewer example.

Robert.

Kazimir De Paris

unread,
Nov 25, 2009, 10:05:32 AM11/25/09
to osg-...@lists.openscenegraph.org
Hey Robert,

Thank you for the information.
There is no application so far, but I am currently evaluating OpenSceneGraph for the purpose of being used as the 3D engine for a game development studio that I am planning on starting up.
I have not gone through the whole GPL license yet. I assumed that the OpenSceneGraph Public License allowed me to freely distribute my binaries (meaning "selling my games") though.

Embedding the source code was a quick hack to avoid struggling with a static library issue (and I think that there is no way to have the osganimation plugin statically linked as of today).

I have no intention to distribute source code ; I want to sell games, and probably use OpenSceneGraph to make them, if it suits my needs.
I will double-check whether the OpenSceneGraph license lets me do that or not.

Cheers,
StratBoy61

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=20362#20362

Robert Osfield

unread,
Nov 25, 2009, 11:01:17 AM11/25/09
to osg-...@lists.openscenegraph.org
HI Kazimir,

On Wed, Nov 25, 2009 at 3:05 PM, Kazimir De Paris <strat...@gmail.com> wrote:
> Thank you for the information.
> There is no application so far, but I am currently evaluating OpenSceneGraph for the purpose of being used as the 3D engine for a game development studio that I am planning on starting up.
> I have not gone through the whole GPL license yet.  I assumed that the OpenSceneGraph Public License allowed me to freely distribute my binaries (meaning "selling my games") though.
>
> Embedding the source code was a quick hack to avoid struggling with a static library issue (and I think that there is no way to have the osganimation plugin statically linked as of today).

Have you succeeded in loading .osg files without animations? If
osgAnimation is the exception then it's probably just down to
something missing the plugin that should be easily fixable. I'm not
the author of this particular plugin.

> I have no intention to distribute source code ; I want to sell games, and probably use OpenSceneGraph to make them, if it suits my needs.
> I will double-check whether the OpenSceneGraph license lets me do that or not.

The OSGPL allows you to sell your games, and without publishing your
own code, and it even allows for static link. However, you can't just
copy and paste OSG code into your app, and just distributing binaries
doesn't walk you around this restriction.

Robert.

Reply all
Reply to author
Forward
0 new messages