[osg-users] Deploy OSG application

Dominic Stalder dominic.stalder at bluewin.ch
Sat Nov 21 15:21:54 PST 2009


Hi Stephan

here the answer of my workmate:

I tried this without luck. After compiling the Frameworks and using them 
in my application, I get the following linking errors when building with 
Xcode:

Undefined symbols:
"non-virtual thunk to osgViewer::Viewer::~Viewer()"
"osgDB::readImageFile(std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&, osgDB::Options const*)"
"osgText::readFontFile(std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const&, osgDB::Options const*)"
"osgViewer::Viewer::checkNeedToDoFrame()"
"non-virtual thunk to osgViewer::Viewer::setStartTick(unsigned long long)"
"non-virtual thunk to osgViewer::Viewer::setSceneData(osg::Node*)"

(See complete compiler output attached)

The same also happens when using the pre-compiled binaries from 
http://www.cuboslocos.com

> You can use a similar technique with the dylibs created by the
> cmake-build, but you'll have to adjust the paths via install_name_tool.

Also tried that. Compiled the dylibs with cmake and installed them in 
/usr/local/lib. Compiling and linking against them works fine. For 
packaging I copied them to the application bundle (to Contents/MacOS/) 
and changed all paths using install_name_tool. Starting the application 
does not show any linking errors but the following runtime error occurs:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)

Thread 0 Crashed:
0   libosg.61.dylib      0x0036bda5 osg::Node::getOrCreateStateSet() + 21
1   ....

When starting the application with the default references to 
/usr/local/lib/libosg* there are no such runtime errors.
>
> Or you create an installer package which copies the dylibs / frameworks
> to known places like /Library/Frameworks or /usr/lib

This is currently not an option :-(

~Thomas

Stephan Maximilian Huber schrieb:
> Dominic Stalder schrieb:
>   
>> we are trying to deploy an OSG application on Mac OS X to another
>> system, where OSG is not installed.
>>
>> What is the best way to distribute the application, should we use static
>> OSG linking (makes the file huge) or are there other / better ways?
>>     
>
> I haven't tried static builds on OS X, so I can't comment on them.
>
> If you are using the deprecated xcode-projects to build osg as
> frameworks you can embed them into your application bundle and
> distribute it. This gives you a double-clickable app qhich you can copy
> wherever you want, no installation-step necessary.
>
> You just add a new copy-phase into your xcode-project of your app, set
> it's target to Frameworks and add all osg-related frameworks to it. (and
> the plugins goes into a subfolder plugins of the bundle)
>
> You can use a similar technique with the dylibs created by the
> cmake-build, but you'll have to adjust the paths via install_name_tool.
>
> Or you create an installer package which copies the dylibs / frameworks
> to known places like /Library/Frameworks or /usr/lib
>
>
> HTH,
> Stephan
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osg-framework-linker-errors.txt
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091122/ea5d9f9a/attachment.txt>


More information about the osg-users mailing list