<?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[Nochmal Namespace]]></title><description><![CDATA[<p>Hi,</p>
<p>wenn ich folgende Situtation habe:</p>
<p>t.h:<br />
namespace test{<br />
double a;<br />
extern double b;<br />
}</p>
<p>t.cpp<br />
namespace test{<br />
double b = 2.0;<br />
}</p>
<p>Dann müsste ich doch eigentlich die Variable b über test::b ansprechen können, oder? a kann ich so ansprechen.<br />
Ich habe eine Bib. gebaut, wo das der Fall ist, beim Linken eines Programms mit der Bib. meldet er jedoch:<br />
../src/libtt.so: undefined reference to `test::b'</p>
<p>Gruß<br />
Boris</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/151901/nochmal-namespace</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 16:13:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151901.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Jun 2006 14:01:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nochmal Namespace on Fri, 30 Jun 2006 14:18:12 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>wenn ich folgende Situtation habe:</p>
<p>t.h:<br />
namespace test{<br />
double a;<br />
extern double b;<br />
}</p>
<p>t.cpp<br />
namespace test{<br />
double b = 2.0;<br />
}</p>
<p>Dann müsste ich doch eigentlich die Variable b über test::b ansprechen können, oder? a kann ich so ansprechen.<br />
Ich habe eine Bib. gebaut, wo das der Fall ist, beim Linken eines Programms mit der Bib. meldet er jedoch:<br />
../src/libtt.so: undefined reference to `test::b'</p>
<p>Gruß<br />
Boris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089145</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089145</guid><dc:creator><![CDATA[hjdt]]></dc:creator><pubDate>Fri, 30 Jun 2006 14:18:12 GMT</pubDate></item><item><title><![CDATA[Reply to Nochmal Namespace on Fri, 30 Jun 2006 15:55:57 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ja test::b ist richtig.<br />
Immerhin kommt ein Linker-Fehler und kein Compiler-Fehler, also ist die Syntax in Ordnung.<br />
Ich vermute du hast vergessen die Datei t.cpp in das Projekt und damit in den Compile/Link-Vorgang mit einzubinden.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089183</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 30 Jun 2006 15:55:57 GMT</pubDate></item></channel></rss>