Re: [osg-users] OSG static linking

2014-03-12 Thread Paul Martz
Setting OSG_MSVC_VERSIONED_DLL to OFF appears to fix this issue, and causes
the static .lib names to not contain the SO version. (After I rebuild with
this set to OFF, I'm guessing the stock CMake find scripts will find my
static-built OSG.)

Is that correct? The CMake variable clearly says "DLL", and this is a
static build, so no DLLs are being built. Yet disabling it changes the name
of the output static .lib name.

Just checking.


On Wed, Mar 12, 2014 at 3:17 PM, Paul Martz  wrote:

> Hi all -- Is anyone using CMake to find a static-built OSG? If so, how are
> you getting that to work?
>
> When building static OSG, all the library names are prefixed with
> osg. For example, with OSG v3.3.1, the so version is 111, so I
> get libs named: osg111-osg.lib, osg111-osgDB.lib, osg111-osgUtil.lib, etc.
> And the stock CMake find scripts fail to find those libraries because those
> scripts look for osg.lib, osgDB.lib, osgUtil.lib, etc.
>
> Any info would be appreciated.
>-Paul
>



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


Re: [osg-users] OSG static linking

2014-03-12 Thread Paul Martz
Hi all -- Is anyone using CMake to find a static-built OSG? If so, how are
you getting that to work?

When building static OSG, all the library names are prefixed with
osg. For example, with OSG v3.3.1, the so version is 111, so I
get libs named: osg111-osg.lib, osg111-osgDB.lib, osg111-osgUtil.lib, etc.
And the stock CMake find scripts fail to find those libraries because those
scripts look for osg.lib, osgDB.lib, osgUtil.lib, etc.

Any info would be appreciated.
   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking

2014-03-09 Thread Paul Martz
Robert, Chris, Rui -- Thank you all for the information. Very helpful.
   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking

2014-03-08 Thread Wang Rui
Hi Chris,

As far as I know, USE_OSGPLUGIN only calls a C-styled function through a
static proxy variable, which is defined by REGISTER_OSGPLUGIN in the plugin
source code body. So compiler can thus find and register the plugin while
static linking. It should do no harm to user applications no matter
dynamic/static linked.

Wang Rui


2014-03-09 0:14 GMT+08:00 Chris Hanson :

> I think what Paul was asking is, if you build and install OSG, is there
> any state retained anywhere (in a #define in a config.h or something) that
> indicates _if_ OSG itself WAS built with OSG_STATIC, and therefore if the
> application needs to configure its own #if blocks to automatically
> instantiate the USE_OSGPLUGIN code.
>
> And the secondary question is -- is there any harm in having USE-OSGPLUGIN
> blocks in an application that is using OSG dynamically linked?
>
> I tried to answer the question, but discovered that I don't actually know
> these answers.
>
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking

2014-03-08 Thread Chris Hanson
I think what Paul was asking is, if you build and install OSG, is there any
state retained anywhere (in a #define in a config.h or something) that
indicates _if_ OSG itself WAS built with OSG_STATIC, and therefore if the
application needs to configure its own #if blocks to automatically
instantiate the USE_OSGPLUGIN code.

And the secondary question is -- is there any harm in having USE-OSGPLUGIN
blocks in an application that is using OSG dynamically linked?

I tried to answer the question, but discovered that I don't actually know
these answers.


On Sat, Mar 8, 2014 at 1:22 AM, Robert Osfield wrote:

> Hi Paul,
>
>
> On 7 March 2014 20:50, Paul Martz  wrote:
>
>> If OSG is linked statically, obviously I need to reference a plugin with
>> the USE_OSGPLUGIN macro.
>>
>> Is there any way I can determine at compile time whether the OSG I'm
>> linking against was built as static or dynamic? I want to use USE_OSGPLUGIN
>> if OSG was built static, and not use it otherwise, right?
>>
>> Should USE_OSGPLUGIN be defined as a no-op if OSG is built dynamic?
>>
>
> My inclination would be to simply put the block of USE_OSGPLUGIN in the
> end user application into a #if #endif block rather than making
> USE_OSGPLUGIN something that itself contains an #if #endif block.
>
> Robert.
>
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training * Consulting * Contracting
3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 *
GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL
Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography
* Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS *
Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking

2014-03-08 Thread Robert Osfield
Hi Paul,


On 7 March 2014 20:50, Paul Martz  wrote:

> If OSG is linked statically, obviously I need to reference a plugin with
> the USE_OSGPLUGIN macro.
>
> Is there any way I can determine at compile time whether the OSG I'm
> linking against was built as static or dynamic? I want to use USE_OSGPLUGIN
> if OSG was built static, and not use it otherwise, right?
>
> Should USE_OSGPLUGIN be defined as a no-op if OSG is built dynamic?
>

My inclination would be to simply put the block of USE_OSGPLUGIN in the end
user application into a #if #endif block rather than making USE_OSGPLUGIN
something that itself contains an #if #endif block.

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


[osg-users] OSG static linking

2014-03-07 Thread Paul Martz
If OSG is linked statically, obviously I need to reference a plugin with
the USE_OSGPLUGIN macro.

Is there any way I can determine at compile time whether the OSG I'm
linking against was built as static or dynamic? I want to use USE_OSGPLUGIN
if OSG was built static, and not use it otherwise, right?

Should USE_OSGPLUGIN be defined as a no-op if OSG is built dynamic?

Thanks,
-- 
   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking for commercial application

2011-09-15 Thread Chris 'Xenon' Hanson
On 9/15/2011 1:43 AM, Robert Osfield wrote:
> HI Chris,
> On Wed, Sep 14, 2011 at 11:02 PM, Chris 'Xenon' Hanson
>  wrote:
>>  Does there need to be a license amendment/exemption or something for the 
>> examples?
> 
> The examples I've written don't use the OSGPL, rather just a simply note 
> saying:
> 
> /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
>  *
>  * This application is open source and may be redistributed and/or modified
>  * freely and without restriction, both in commercial and non
> commercial applications,
>  * as long as this copyright notice is maintained.
>  *
>  * This application is distributed in the hope that it will be useful,
>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> */
> 
> 
> The intention is that you can copy and paste bits if you want from the 
> example.

  Maybe a sweep of the examples and a prominent note to this effect somewhere 
might be in
order to clarify.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking for commercial application

2011-09-15 Thread Aurelien Albert
Thanks for all these clarifications !

About the plugins : where can I find specific plugin license ?

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





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


Re: [osg-users] OSG static linking for commercial application

2011-09-15 Thread Robert Osfield
HI Chris,

On Wed, Sep 14, 2011 at 11:02 PM, Chris 'Xenon' Hanson
 wrote:
>  Does there need to be a license amendment/exemption or something for the 
> examples?

The examples I've written don't use the OSGPL, rather just a simply note saying:

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
 *
 * This application is open source and may be redistributed and/or modified
 * freely and without restriction, both in commercial and non
commercial applications,
 * as long as this copyright notice is maintained.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/


The intention is that you can copy and paste bits if you want from the example.

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


Re: [osg-users] OSG static linking for commercial application

2011-09-14 Thread Chris 'Xenon' Hanson
On 9/14/2011 12:08 PM, Jason Daly wrote:
> This is provided that you don't copy any code into OpenSceneGraph or your own 
> code that is
> licensed as LGPL or GPL-only (as stated in exception #3).

  This raises an old, but still relevant side issue.

  I imagine most people copy bits of working code from the examples into their
applications and then modify it. Technically, for a closed-source app this is a 
license
violation, but I believe that this is the very purpose the examples were 
intended for.

  Does there need to be a license amendment/exemption or something for the 
examples?

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking for commercial application

2011-09-14 Thread Jason Daly

On 09/14/2011 01:36 PM, Aurelien Albert wrote:

Hi,

This is a question about legal statement, not technical.

I'm working on a commercial project based on OSG.

I made a dynamic library "3dstuff.dll" with all my 3D stuff, this DLL uses OSG.

Can I use static linking of OSG with my "3dstuff.dll" to distribute only this 
DLL with my executable file ?

Or is it an OSG license violation and I have to distribute OSG as a set of 
dynamic librairies ? (osg.dll, osgGA.dll, osgXX.dll )

I ask this question here because I found this :

"The OpenSceneGraph Public License is designed to be compatible with use of 
proprietary applications, such applications can statically and dynamically link to the 
OpenSceneGraph and can be redistributed with the libraries free of charge. Your 
applications can be distributed under any license, be it open source or proprietary."

at http://www.openscenegraph.org/projects/osg/wiki/Legal

which seems to say "ok, you can do that"

But in the complete license text, here : 
http://www.openscenegraph.org/projects/osg/attachment/wiki/Legal/LICENSE.txt I 
didn't find anything about static linking.


The relevant text is in the wxWindows exception #2 near the top:

   2. The exception is that you may use, copy, link, modify and
   distribute under the user's own terms, binary object code versions
   of works based on the Library.


Meaning that you are not required to distribute your own source code 
when you link it against OSG (either statically or dynamically).


This is provided that you don't copy any code into OpenSceneGraph or 
your own code that is licensed as LGPL or GPL-only (as stated in 
exception #3).


--"J"
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG static linking for commercial application

2011-09-14 Thread Robert Osfield
Hi Albert,

You can statically link the OSG libraries as they are all OSGPL based,
a license which exists solely to enalbe you to embed or staically like
OSG.  Some of the plugins aren't OSGPL based so you'll need to take
care with those, most are OSGPL though.

Robert.

On Wed, Sep 14, 2011 at 6:36 PM, Aurelien Albert
 wrote:
> Hi,
>
> This is a question about legal statement, not technical.
>
> I'm working on a commercial project based on OSG.
>
> I made a dynamic library "3dstuff.dll" with all my 3D stuff, this DLL uses 
> OSG.
>
> Can I use static linking of OSG with my "3dstuff.dll" to distribute only this 
> DLL with my executable file ?
>
> Or is it an OSG license violation and I have to distribute OSG as a set of 
> dynamic librairies ? (osg.dll, osgGA.dll, osgXX.dll )
>
> I ask this question here because I found this :
>
> "The OpenSceneGraph Public License is designed to be compatible with use of 
> proprietary applications, such applications can statically and dynamically 
> link to the OpenSceneGraph and can be redistributed with the libraries free 
> of charge. Your applications can be distributed under any license, be it open 
> source or proprietary."
>
> at http://www.openscenegraph.org/projects/osg/wiki/Legal
>
> which seems to say "ok, you can do that"
>
> But in the complete license text, here : 
> http://www.openscenegraph.org/projects/osg/attachment/wiki/Legal/LICENSE.txt 
> I didn't find anything about static linking.
>
> Thanks.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=42765#42765
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG static linking for commercial application

2011-09-14 Thread Aurelien Albert
Hi,

This is a question about legal statement, not technical.

I'm working on a commercial project based on OSG.

I made a dynamic library "3dstuff.dll" with all my 3D stuff, this DLL uses OSG.

Can I use static linking of OSG with my "3dstuff.dll" to distribute only this 
DLL with my executable file ?

Or is it an OSG license violation and I have to distribute OSG as a set of 
dynamic librairies ? (osg.dll, osgGA.dll, osgXX.dll )

I ask this question here because I found this :

"The OpenSceneGraph Public License is designed to be compatible with use of 
proprietary applications, such applications can statically and dynamically link 
to the OpenSceneGraph and can be redistributed with the libraries free of 
charge. Your applications can be distributed under any license, be it open 
source or proprietary."

at http://www.openscenegraph.org/projects/osg/wiki/Legal

which seems to say "ok, you can do that"

But in the complete license text, here : 
http://www.openscenegraph.org/projects/osg/attachment/wiki/Legal/LICENSE.txt I 
didn't find anything about static linking.

Thanks.

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





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


Re: [osg-users] osg static linking with plugins program can not close normally

2008-04-01 Thread wangzhuhhjj
hi,

 It's a wired problem, the program crash, after a while on:

> WoHouse_s.exe!free(void * pBlock=0x0103a970)  line103 C

  
WoHouse_s.exe!std::allocator,std::allocator >,0> 
>::_Node>::deallocate(std::_Tree_nod,std::allocator >,0> >::_Node * _Ptr=0xd0ff0274, unsigned int 
__formal=1853548630)  line 132 + 0x9 C++

so i think the problem may relate to osg's plugin's deallocating, any help?

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


Re: [osg-users] osg static linking with plugins program can not close normally

2008-04-01 Thread Robert Osfield
Hi Shubo,

Static build with the OSG is still very much on the bleeding edge.  I
wrote the osgstaticviewer to help flesh how its possible to manually
register plugins to get around the name managling issue.  I only have
linux here so I've personally only tested here, its likely to work
under other unices, but for Windows I have to rely upon Windows
experts to test/debug.

Robert.

On Tue, Apr 1, 2008 at 3:04 AM, wangzhuhhjj <[EMAIL PROTECTED]> wrote:
>
>
> Hi,Guys
>I am trying to staticly linking osg. When using dlls of dynamic
> linking, my programm is all ok, but when i use static link , i find that my
> program can not be closed normally, when app close, the process is still on
> in the process monitor, after some time, the program crash on "free"
> function.
>  I found that if i do not load the dlls using mangled names(the plugins
> i'm using are: ive/png/freetype/tga), that's ok, so i think the problem may
> lies on the loading and deloading the plugins, maybe memory free, any ideas?
> thanks a lot!
>
> shubo
> ___
>  osg-users mailing list
>  osg-users@lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osg static linking with plugins program can not close normally

2008-03-31 Thread wangzhuhhjj
Hi,Guys
   I am trying to staticly linking osg. When using dlls of dynamic linking, 
my programm is all ok, but when i use static link , i find that my program can 
not be closed normally, when app close, the process is still on in the process 
monitor, after some time, the program crash on "free" function.
 I found that if i do not load the dlls using mangled names(the plugins i'm 
using are: ive/png/freetype/tga), that's ok, so i think the problem may lies on 
the loading and deloading the plugins, maybe memory free, any ideas? thanks a 
lot!

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