<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[solved] Linker Probleme unter Linux (g++)]]></title><description><![CDATA[<p>Hallo miteinander,</p>
<p>ich verzweifel gerade an einem Linker Problem unter Linux, und zwar versuche ich, eine Grafikengine (Ogre3D) in Eclipse zu übersetzen. Es gibt bereits einen Codeblocks Workspace für Linux, von dem ich die Konfiguration versucht habe zu übernehmen.<br />
Die Engine besteht aus mehreren shared libs. Die Hauptbibliothek (OgreMain) wird ohne Probleme kompiliert und auch verlinkt.</p>
<p>Eine darauf aufbauende Bibliothek (RenderSystemGL) kompiliert zwar ebenfalls, allerdings bekomme ich eine Unmenge an undefinierten Referenzen zur c++ Standardbibliothek (der Standardweg mittels ./configure make make install funktioniert hingegen).</p>
<p>hier die Linker Ausgabe:</p>
<blockquote>
<p>**** Build of configuration Debug for project RenderSystem_GL ****</p>
<p>Building target: libRenderSystem_GL_d.so<br />
Invoking: GCC C++ Linker</p>
<p>g++ -L&quot;/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/OgreMain/Debug&quot; -shared -o&quot;libRenderSystem_GL_d.so&quot; ./src/nvparse/_ps1.0_lexer.o ./src/nvparse/_ps1.0_parser.o ./src/nvparse/_rc1.0_lexer.o ./src/nvparse/_rc1.0_parser.o ./src/nvparse/_ts1.0_lexer.o ./src/nvparse/_ts1.0_parser.o ./src/nvparse/_vs1.0_lexer.o ./src/nvparse/_vs1.0_parser.o ./src/nvparse/avp1.0_impl.o ./src/nvparse/nvparse.o ./src/nvparse/nvparse_errors.o ./src/nvparse/ps1.0_program.o ./src/nvparse/rc1.0_combiners.o ./src/nvparse/rc1.0_final.o ./src/nvparse/rc1.0_general.o ./src/nvparse/ts1.0_inst.o ./src/nvparse/ts1.0_inst_list.o ./src/nvparse/vcp1.0_impl.o ./src/nvparse/vp1.0_impl.o ./src/nvparse/vs1.0_inst.o ./src/nvparse/vs1.0_inst_list.o ./src/nvparse/vsp1.0_impl.o ./src/OgreGLATIFSInit.o ./src/OgreGLContext.o ./src/OgreGLDefaultHardwareBufferManager.o ./src/OgreGLEngineDll.o ./src/OgreGLFBOMultiRenderTarget.o ./src/OgreGLFBORenderTexture.o ./src/OgreGLFrameBufferObject.o ./src/OgreGLGpuNvparseProgram.o ./src/OgreGLGpuProgram.o ./src/OgreGLGpuProgramManager.o ./src/OgreGLHardwareBufferManager.o ./src/OgreGLHardwareIndexBuffer.o ./src/OgreGLHardwareOcclusionQuery.o ./src/OgreGLHardwarePixelBuffer.o ./src/OgreGLHardwareVertexBuffer.o ./src/OgreGLPBRenderTexture.o ./src/OgreGLPixelFormat.o ./src/OgreGLPlugin.o ./src/OgreGLRenderSystem.o ./src/OgreGLRenderTexture.o ./src/OgreGLSupport.o ./src/OgreGLTexture.o ./src/OgreGLTextureManager.o ./src/glew.o ./src/atifs/src/ATI_FS_GLGpuProgram.o ./src/atifs/src/Compiler2Pass.o ./src/atifs/src/ps_1_4.o ./src/GLX/OgreGLXContext.o ./src/GLX/OgreGLXGLSupport.o ./src/GLX/OgreGLXRenderTexture.o ./src/GLX/OgreGLXUtils.o ./src/GLX/OgreGLXWindow.o ./src/GLSL/src/OgreGLSLExtSupport.o ./src/GLSL/src/OgreGLSLGpuProgram.o ./src/GLSL/src/OgreGLSLLinkProgram.o ./src/GLSL/src/OgreGLSLLinkProgramManager.o ./src/GLSL/src/OgreGLSLProgram.o ./src/GLSL/src/OgreGLSLProgramFactory.o -lX11 -lXext -lGL -lXrandr -lXxf86vm -lGLU -lOgreMain_d</p>
<p>./src/nvparse/_ps1.0_lexer.o: In function <code>ps10_lex()': /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_tokens.l:82: undefined reference to</code>std::allocator&lt;char&gt;::allocator()'<br />
/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem_GL/Debug/ps1.0_tokens.l:82: undefined reference to <code>std::allocator&lt;char&gt;::~allocator()' /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_tokens.l:82: undefined reference to</code>std::allocator&lt;char&gt;::~allocator()'<br />
...<br />
./src/nvparse/_ps1.0_parser.o: In function <code>ps10_parse()': /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_grammar.y:154: undefined reference to</code>std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::operator=(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'<br />
/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem_GL/Debug/ps1.0_grammar.y:159: undefined reference to <code>std::basic\_string&lt;char, std::char\_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::~basic_string()' /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_grammar.y:189: undefined reference to</code>std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::~basic_string()'<br />
/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem_GL/Debug/ps1.0_grammar.y:190: undefined reference to `std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::~basic_string()'<br />
...</p>
<p>und viele weitere, ähnliche Fehler...</p>
</blockquote>
<p>Die von Codeblocks übernommene Konfiguration (defines, compiler settings etc.) sieht wie folgt aus:</p>
<blockquote>
<p><strong>defines:</strong></p>
<p>OGRE_GL_USE_MULTITEXTURING<br />
OGRE_GLPLUGIN_EXPORTS<br />
OGRE_GCC_VISIBILITY<br />
PIC<br />
YY_NEVER_INTERACTIVE<br />
YY_NO_UNPUT<br />
DEBUG</p>
</blockquote>
<blockquote>
<p><strong>compiler flags:</strong></p>
<p>-c<br />
-fmessage-length=0<br />
-fexceptions<br />
-fident<br />
-pipe<br />
-fvisibility=hidden<br />
-fvisibility-inlines-hidden<br />
-fPIC</p>
</blockquote>
<blockquote>
<p><strong>libs:</strong></p>
<p>X11<br />
Xext<br />
GL<br />
Xrandr<br />
Xxf86vm<br />
GLU<br />
OgreMain_d</p>
</blockquote>
<p>Hat jemand eine Ahnung, warum es hier mit dem Linken nicht klappt? Ich habe mal in die generierten Makefiles geschaut; in denen ist die Option -nostdlibs aktiviert. Ich würde die Eclipse Konfiguration aber gerne möglichst generisch halten, ohne explizit auf bestimmte Standardbibliotheken zu verlinken (in Codeblocks waren diese Einstellungen wie gesagt ebenfalls ohne das -nostdlibs flag).</p>
<p>viele Grüße,<br />
David</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/181739/solved-linker-probleme-unter-linux-g</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 10:38:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/181739.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 16 May 2007 17:46:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 23:08:18 GMT]]></title><description><![CDATA[<p>Hallo miteinander,</p>
<p>ich verzweifel gerade an einem Linker Problem unter Linux, und zwar versuche ich, eine Grafikengine (Ogre3D) in Eclipse zu übersetzen. Es gibt bereits einen Codeblocks Workspace für Linux, von dem ich die Konfiguration versucht habe zu übernehmen.<br />
Die Engine besteht aus mehreren shared libs. Die Hauptbibliothek (OgreMain) wird ohne Probleme kompiliert und auch verlinkt.</p>
<p>Eine darauf aufbauende Bibliothek (RenderSystemGL) kompiliert zwar ebenfalls, allerdings bekomme ich eine Unmenge an undefinierten Referenzen zur c++ Standardbibliothek (der Standardweg mittels ./configure make make install funktioniert hingegen).</p>
<p>hier die Linker Ausgabe:</p>
<blockquote>
<p>**** Build of configuration Debug for project RenderSystem_GL ****</p>
<p>Building target: libRenderSystem_GL_d.so<br />
Invoking: GCC C++ Linker</p>
<p>g++ -L&quot;/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/OgreMain/Debug&quot; -shared -o&quot;libRenderSystem_GL_d.so&quot; ./src/nvparse/_ps1.0_lexer.o ./src/nvparse/_ps1.0_parser.o ./src/nvparse/_rc1.0_lexer.o ./src/nvparse/_rc1.0_parser.o ./src/nvparse/_ts1.0_lexer.o ./src/nvparse/_ts1.0_parser.o ./src/nvparse/_vs1.0_lexer.o ./src/nvparse/_vs1.0_parser.o ./src/nvparse/avp1.0_impl.o ./src/nvparse/nvparse.o ./src/nvparse/nvparse_errors.o ./src/nvparse/ps1.0_program.o ./src/nvparse/rc1.0_combiners.o ./src/nvparse/rc1.0_final.o ./src/nvparse/rc1.0_general.o ./src/nvparse/ts1.0_inst.o ./src/nvparse/ts1.0_inst_list.o ./src/nvparse/vcp1.0_impl.o ./src/nvparse/vp1.0_impl.o ./src/nvparse/vs1.0_inst.o ./src/nvparse/vs1.0_inst_list.o ./src/nvparse/vsp1.0_impl.o ./src/OgreGLATIFSInit.o ./src/OgreGLContext.o ./src/OgreGLDefaultHardwareBufferManager.o ./src/OgreGLEngineDll.o ./src/OgreGLFBOMultiRenderTarget.o ./src/OgreGLFBORenderTexture.o ./src/OgreGLFrameBufferObject.o ./src/OgreGLGpuNvparseProgram.o ./src/OgreGLGpuProgram.o ./src/OgreGLGpuProgramManager.o ./src/OgreGLHardwareBufferManager.o ./src/OgreGLHardwareIndexBuffer.o ./src/OgreGLHardwareOcclusionQuery.o ./src/OgreGLHardwarePixelBuffer.o ./src/OgreGLHardwareVertexBuffer.o ./src/OgreGLPBRenderTexture.o ./src/OgreGLPixelFormat.o ./src/OgreGLPlugin.o ./src/OgreGLRenderSystem.o ./src/OgreGLRenderTexture.o ./src/OgreGLSupport.o ./src/OgreGLTexture.o ./src/OgreGLTextureManager.o ./src/glew.o ./src/atifs/src/ATI_FS_GLGpuProgram.o ./src/atifs/src/Compiler2Pass.o ./src/atifs/src/ps_1_4.o ./src/GLX/OgreGLXContext.o ./src/GLX/OgreGLXGLSupport.o ./src/GLX/OgreGLXRenderTexture.o ./src/GLX/OgreGLXUtils.o ./src/GLX/OgreGLXWindow.o ./src/GLSL/src/OgreGLSLExtSupport.o ./src/GLSL/src/OgreGLSLGpuProgram.o ./src/GLSL/src/OgreGLSLLinkProgram.o ./src/GLSL/src/OgreGLSLLinkProgramManager.o ./src/GLSL/src/OgreGLSLProgram.o ./src/GLSL/src/OgreGLSLProgramFactory.o -lX11 -lXext -lGL -lXrandr -lXxf86vm -lGLU -lOgreMain_d</p>
<p>./src/nvparse/_ps1.0_lexer.o: In function <code>ps10_lex()': /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_tokens.l:82: undefined reference to</code>std::allocator&lt;char&gt;::allocator()'<br />
/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem_GL/Debug/ps1.0_tokens.l:82: undefined reference to <code>std::allocator&lt;char&gt;::~allocator()' /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_tokens.l:82: undefined reference to</code>std::allocator&lt;char&gt;::~allocator()'<br />
...<br />
./src/nvparse/_ps1.0_parser.o: In function <code>ps10_parse()': /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_grammar.y:154: undefined reference to</code>std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::operator=(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'<br />
/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem_GL/Debug/ps1.0_grammar.y:159: undefined reference to <code>std::basic\_string&lt;char, std::char\_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::~basic_string()' /home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem\_GL/Debug/ps1.0\_grammar.y:189: undefined reference to</code>std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::~basic_string()'<br />
/home/schmelly/Dateien/Projekte/Cpp/ogrenew/LinuxEclipse/RenderSystems/RenderSystem_GL/Debug/ps1.0_grammar.y:190: undefined reference to `std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;::~basic_string()'<br />
...</p>
<p>und viele weitere, ähnliche Fehler...</p>
</blockquote>
<p>Die von Codeblocks übernommene Konfiguration (defines, compiler settings etc.) sieht wie folgt aus:</p>
<blockquote>
<p><strong>defines:</strong></p>
<p>OGRE_GL_USE_MULTITEXTURING<br />
OGRE_GLPLUGIN_EXPORTS<br />
OGRE_GCC_VISIBILITY<br />
PIC<br />
YY_NEVER_INTERACTIVE<br />
YY_NO_UNPUT<br />
DEBUG</p>
</blockquote>
<blockquote>
<p><strong>compiler flags:</strong></p>
<p>-c<br />
-fmessage-length=0<br />
-fexceptions<br />
-fident<br />
-pipe<br />
-fvisibility=hidden<br />
-fvisibility-inlines-hidden<br />
-fPIC</p>
</blockquote>
<blockquote>
<p><strong>libs:</strong></p>
<p>X11<br />
Xext<br />
GL<br />
Xrandr<br />
Xxf86vm<br />
GLU<br />
OgreMain_d</p>
</blockquote>
<p>Hat jemand eine Ahnung, warum es hier mit dem Linken nicht klappt? Ich habe mal in die generierten Makefiles geschaut; in denen ist die Option -nostdlibs aktiviert. Ich würde die Eclipse Konfiguration aber gerne möglichst generisch halten, ohne explizit auf bestimmte Standardbibliotheken zu verlinken (in Codeblocks waren diese Einstellungen wie gesagt ebenfalls ohne das -nostdlibs flag).</p>
<p>viele Grüße,<br />
David</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286384</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286384</guid><dc:creator><![CDATA[Schmelly]]></dc:creator><pubDate>Wed, 16 May 2007 23:08:18 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 18:01:58 GMT]]></title><description><![CDATA[<p>-nostdlibs ist aktiviert? Dann linkt er aber auch gegen keine Standard-Librarys.</p>
<p>Dann kann er die entsprechenden Referenzen natuerlich auch nicht finden.</p>
<p>gruss<br />
v R</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286397</guid><dc:creator><![CDATA[virtuell Realisticer]]></dc:creator><pubDate>Wed, 16 May 2007 18:01:58 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 18:04:45 GMT]]></title><description><![CDATA[<p>Im uebrigen solltest du, laut gcc-Doku, gegen libgcc (-lgcc) linken, wenn du<br />
-nostdlib verwendest, damit du keine undefined references bzgl. gcc-internen<br />
Subroutinen bekommst.</p>
<p>gruss<br />
v R</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286403</guid><dc:creator><![CDATA[virtuell Realisticer]]></dc:creator><pubDate>Wed, 16 May 2007 18:04:45 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 18:13:21 GMT]]></title><description><![CDATA[<p>Nein nein ich verwende das Flag -nostdlibs nicht. Es wird von den autotools benutzt, die ich in Eclipse aber nur sehr ungern nutzen möchte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286413</guid><dc:creator><![CDATA[Schmelly]]></dc:creator><pubDate>Wed, 16 May 2007 18:13:21 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 18:16:02 GMT]]></title><description><![CDATA[<p>Um das nochmal deutlich zu machen:</p>
<p>Wenn ich Ogre3D mit den Autotools kompiliere (./configure, make, make install) geht alles glatt.</p>
<p>Ich würde aber gerne in Eclipse kompilieren und auf die Autotools verzichten. (Bei der <a href="http://libOgreMain.so" rel="nofollow">libOgreMain.so</a> hat ja in Eclipse auch alles funktioniert, ich kann mir zur Zeit einfach keinen Reim darauf machen, warum es bei der libRenderSystem_GL.so nicht klappt)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286417</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286417</guid><dc:creator><![CDATA[Schmelly]]></dc:creator><pubDate>Wed, 16 May 2007 18:16:02 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 20:05:08 GMT]]></title><description><![CDATA[<p>Auf meinem Debian-Sid System habe ich seit dem Update von libstdc++-4.1.1 auf libstdc++-4.1.2 von das gleiche Problem, wenn ich -fvisibility-inlines-hidden in die CXXFLAGS hinzufüge. Auf Ubuntu ist es laut diesem Bugreport<br />
<a href="https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/109262" rel="nofollow">https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/109262</a><br />
das gleiche.<br />
Mit g++-4.2, also libstdc++-4.2, funktioniert alles wunderbar.</p>
<p>Ob du nun Debian/Ubuntu Nutzer bist oder nicht, das einfachste ist -fvisibility-inlines-hidden wegzulassen.</p>
<p>Zu -fvisibility=hidden kann ich nur sagen, dass es AFAIK nur von den Entwicklern der Bibliothek gesetzt werden sollte, da der Quellcode angepasst werden muss.<br />
-fvisibility-inlines-hidden hingegen sollte ohne eingriff in den Quellcode funktionieren, sollte.</p>
<p>MfG Maik</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286488</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286488</guid><dc:creator><![CDATA[Maik Beckmann]]></dc:creator><pubDate>Wed, 16 May 2007 20:05:08 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Linker Probleme unter Linux (g++) on Wed, 16 May 2007 23:08:01 GMT]]></title><description><![CDATA[<p>Das ist exakt die Lösung für mein Problem, danke sehr <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1286567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1286567</guid><dc:creator><![CDATA[Schmelly]]></dc:creator><pubDate>Wed, 16 May 2007 23:08:01 GMT</pubDate></item></channel></rss>