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

John Vidar Larring larring at weatherone.tv
Mon Sep 22 02:08:17 PDT 2008


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.




More information about the osg-users mailing list