[osg-users] Compile error in OSG trunk rev 8909

Robert Osfield robert.osfield at gmail.com
Mon Sep 22 03:50:23 PDT 2008


Hi Serge,

The getWorldMatrices() method is implementated and checked into svn.

   http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osg/Drawable.cpp?rev=8880

Check your local to make sure that it's checked out Drawable.cpp properly.

Robert.

On Mon, Sep 22, 2008 at 11:00 AM, Serge Lages <serge.lages at gmail.com> wrote:
> There is another compile error with this revision on osgParticle :
>
> ModularEmitter.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: class std::vector<class osg::Matrixd,class
> std::allocator<class osg::Matrixd> > __thiscall
> osg::Drawable::getWorldMatrices(class osg::Node const *)const "
> (__imp_?getWorldMatrices at Drawable@osg@@QBE?AV?$vector at VMatrixd@osg@@V?$allocator at VMatrixd@osg@@@std@@@std@@PBVNode at 2@@Z)
> referenced in function "protected: virtual void __thiscall
> osgParticle::ModularEmitter::emit(double)"
> (?emit at ModularEmitter@osgParticle@@MAEXN at Z)
> OpenSceneGraph\lib\Debug\..\..\bin\osg47-osgParticled.dll : fatal error
> LNK1120: 1 unresolved externals
>
> The function osg::Drawable::getWorldMatrices seems to be declared into the
> header file but not into the cpp file.
>
> On Mon, Sep 22, 2008 at 11:37 AM, John Vidar Larring <larring at weatherone.tv>
> wrote:
>>
>> Hi again,
>>
>> Sorry for creating all this traffic communicating with myself, but here's
>> the fix to get OSG trunk rev 8909 to compile (I'll send a zip file to
>> osg-submission):
>>
>> % svn diff CMakeLists.txt
>> Index: CMakeLists.txt
>> ===================================================================
>> --- CMakeLists.txt      (revision 8909)
>> +++ CMakeLists.txt      (working copy)
>> @@ -534,7 +534,7 @@
>>
>>  # Add a default plugin search path component
>>  IF   (DYNAMIC_OPENSCENEGRAPH)
>> -
>> ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH="${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS}")
>> +
>> ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH='"${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS}"')
>>  ENDIF(DYNAMIC_OPENSCENEGRAPH)
>>
>>  INCLUDE(OsgMacroUtils)
>>
>>
>> Best regards,
>> John
>>
>> John Vidar Larring wrote:
>>>
>>> Hi again,
>>>
>>> The compile error seems to be due to faulty CXX_FLAG settings in the
>>> flags.make files created by cmake:
>>>
>>> % grep OSG_DEFAULT_LIBRARY_PATH flags.make
>>> CXX_FLAGS =   -O3 -DNDEBUG
>>> -I/home/john/external.el4/OpenSceneGraph/build_trunk_release/include
>>> -I/home/john/external.el4/OpenSceneGraph/trunk/include
>>> -DOSG_DEBUG_POSTFIX='"d"'
>>> -DOSG_DEFAULT_LIBRARY_PATH="/usr/local/lib64/osgPlugins-2.7.3"
>>>
>>> OSG_DEFAULT_LIBRARY_PATH should probably have been set to:
>>> -DOSG_DEFAULT_LIBRARY_PATH='"/usr/local/lib64/osgPlugins-2.7.3"'
>>>
>>> (i.e. missing single quotes.) I hope someone can tell me how to fiks this
>>> problem:)
>>>
>>> Best regards,
>>> John
>>>
>>> John Vidar Larring wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am having trouble compiling OSG trunk after doing svn update:
>>>>
>>>> % svn update
>>>> At revision 8909.
>>>> ...
>>>> [ 14%] Building CXX object src/osgDB/CMakeFiles/osgDB.dir/FileUtils.o
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp: In
>>>> function `void appendInstallationLibraryFilePaths(osgDB::FilePathList&)':
>>>>
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp:371:
>>>> error: expected primary-expression before '/' token
>>>>
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp:371:
>>>> error: `usr' was not declared in this scope
>>>>
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp:371:
>>>> error: `local' was not declared in this scope
>>>>
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp:371:
>>>> error: `lib64' was not declared in this scope
>>>>
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp:371:
>>>> error: `osgPlugins' was not declared in this scope
>>>>
>>>> /home/john/external.el4/OpenSceneGraph/trunk/src/osgDB/FileUtils.cpp:371:24:
>>>> too many decimal points in number
>>>> make[2]: *** [src/osgDB/CMakeFiles/osgDB.dir/FileUtils.o] Error 1
>>>> make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>> Exit 2
>>>>
>>>> The problem seems to be that the string contained by
>>>> OSG_DEFAULT_LIBRARY_PATH is not limited by quotation marks:
>>>>
>>>> static void appendInstallationLibraryFilePaths(osgDB::FilePathList&
>>>> filepath)
>>>> {
>>>> #ifdef OSG_DEFAULT_LIBRARY_PATH
>>>>    // Append the install prefix path to the library search path if
>>>> configured
>>>>    filepath.push_back(OSG_DEFAULT_LIBRARY_PATH);   <---- Line 371
>>>> #endif
>>>> }
>>>>
>>>>
>>>> Best regards,
>>>> John
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Best regards,
>> John
>> WeatherOne
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> Serge Lages
> http://www.tharsis-software.com
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



More information about the osg-users mailing list