OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Linking Errors with OSG-3.3.0 and MSYS


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11604

PostPosted: Wed Jul 23, 2014 9:53 pm    Post subject:
Linking Errors with OSG-3.3.0 and MSYS
Reply with quote

Hi Paul,
Could you please try svn/trunk or OSG-3.3.2 rather than 3.3.0 as there a range of build fixes in them.
Robert On 23 Jul 2014 21:17, "Paul" < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
I can build OSG with MinGW/MSys.
I get link errors when trying to compile an app against it though.
Any ideas?

C:AppsTestwin32mingw>make
Linking CXX executable ..binTest.exe
C:LibsOpenSceneGraph-3.3.0win32mingwliblibosgDB.a(Registry.obj
):Registry.cpp:(.text+0x186e): undefined reference to `osgGetVersion'
C:LibsOpenSceneGraph-3.3.0win32mingwliblibosgDB.a(Registry.obj
):Registry.cpp:(.text+0x7f32): undefined reference to `osg::KdTreeBuilder::KdTre
eBuilder()'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:LibsOpenSceneGraph-3.3.0win32mingwliblibosgDB.a(Registry.obj): bad rel
oc address 0x1 in section `.text$_ZNK5osgDB7Options11libraryNameEv[__ZNK5osgDB7O
ptions11libraryNameEv]'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [../bin/Test.exe] Error 1
make[1]: *** [CMakeFiles/Test.dir/all] Error 2
make: *** [all] Error 2

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





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
aquawicket
User


Joined: 26 Sep 2013
Posts: 20

PostPosted: Mon Jul 28, 2014 8:01 pm    Post subject:
Reply with quote

I just tried OSG versions 3.3.2 and the Trunk version..
I get the same error for all versions.

(OSG CMAKE SETTINGS)
Code:
-G "MinGW Makefiles"
-DCMAKE_CXX_FLAGS="-DWIN32 -D_WINDOWS -I${ZLIB}/win32/mingw -I${PNG}/win32/mingw -I${TIFF}/win32/mingw -I${JPEG}/win32/mingw"
-DBUILD_OSG_APPLICATIONS=OFF
-DDYNAMIC_OPENTHREADS=OFF
-DDYNAMIC_OPENSCENEGRAPH=OFF
-DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF
-DOSG_GL_MATRICES_AVAILABLE=ON
-DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON
-DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON
-DOSG_CPP_EXCEPTIONS_AVAILABLE=ON
-DOSG_GL1_AVAILABLE=ON
-DOSG_GL2_AVAILABLE=ON
-DOSG_GL3_AVAILABLE=OFF
-DOSG_GLES1_AVAILABLE=OFF
-DOSG_GLES2_AVAILABLE=OFF
-DOSG_GL_LIBRARY_STATIC=OFF
-DOSG_USE_QT=OFF
-DCURL_INCLUDE_DIR=${CURL}/include
-DCURL_LIBRARY_DEBUG=${CURL}/win32/mingw/Debug/libcurl.a
-DCURL_LIBRARY=${CURL}/win32/mingw/Release/libcurl.a
-DFREETYPE_INCLUDE_DIR=${FREETYPE}/include
-DFREETYPE_INCLUDE_DIR_freetype2=${FREETYPE}/include
-DFREETYPE_INCLUDE_DIR_ft2build=${FREETYPE}/include
-DFREETYPE_LIBRARY_DEBUG=${FREETYPE}/win32/mingw/Debug/libfreetype.a
-DFREETYPE_LIBRARY=${FREETYPE}/win32/mingw/Release/libfreetype.a
-DZLIB_INCLUDE_DIR=${ZLIB}
-DZLIB_LIBRARY_DEBUG=${ZLIB}/win32/mingw/Debug/libzlibstatic.a
-DZLIB_LIBRARY=${ZLIB}/win32/mingw/Release/libzlibstatic.a
-DPNG_LIBRARY=${PNG}/win32/mingw/Release/libpng16.a
-DPNG_LIBRARY_DEBUG=${PNG}/win32/mingw/Debug/libpng16.a
-DPNG_PNG_INCLUDE_DIR=${PNG}
-DOPENGL_HEADER1="#include GL/gl.h"
-DOPENGL_HEADER2="#include stdlib.h"


(APP LINK ERROR)
Quote:
Linking CXX executable Test.exe
C:\osg-master\win32\mingw\lib\libosgDB.a(Registry.obj):Registry
.cpp:(.text+0x186e): undefined reference to `osgGetVersion'
C:\osg-master\win32\mingw\lib\libosgDB.a(Registry.obj):Registry
.cpp:(.text+0x8462): undefined reference to `osg::KdTreeBuilder::KdTreeBuilder()
'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\osg-master\win32\mingw\lib\libosgDB.a(Registry.obj): bad reloc address
0x1 in section `.text$_ZNK5osgDB7Options11libraryNameEv[__ZNK5osgDB7Options11li
braryNameEv]'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [Test.exe] Error 1
make.exe[1]: *** [CMakeFiles/Test.dir/all] Error 2
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts OpenSceneGraph static linking for And... tanshihaj Build system [build] 1 Thu Sep 21, 2017 12:56 pm View latest post
No new posts OpenSceneGraph static linking for And... tanshihaj Build system [build] 1 Sun Aug 13, 2017 10:09 pm View latest post
No new posts #include <string> on MSVC resul... Voerman, L. General 4 Tue Jul 11, 2017 11:28 am View latest post
No new posts Dynamic linking of fbx plugin and fbx... Vladimir Chebaev Submission 5 Mon Nov 14, 2016 1:20 pm View latest post
No new posts Plugins errors for unsupported files Riccardo Corsi General 4 Tue Oct 18, 2016 5:21 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP