<?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[Eigenartiger Fehler...]]></title><description><![CDATA[<p>Ohne euch jetzt mal den Quellcode zu zeigen bekomme ich folgende Fehlermelung.<br />
(nicht wundern, XML Parser Quellcode ist aus der nature Application geklaut, aber umgeproggt)</p>
<pre><code>1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(wchar_t const *)&quot; (??0NamedObject@nhe@@QAE@PB_W@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class nhe::NamedObject const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::~NamedObject(void)&quot; (??1NamedObject@nhe@@QAE@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: class nhe::NamedObject &amp; __thiscall nhe::NamedObject::operator=(class nhe::NamedObject const &amp;)&quot; (??4NamedObject@nhe@@QAEAAV01@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp; __thiscall nhe::NamedObject::getName(void)const &quot; (?getName@NamedObject@nhe@@QBEABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(wchar_t const *)&quot; (??0NamedObject@nhe@@QAE@PB_W@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class nhe::NamedObject const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::~NamedObject(void)&quot; (??1NamedObject@nhe@@QAE@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: class nhe::NamedObject &amp; __thiscall nhe::NamedObject::operator=(class nhe::NamedObject const &amp;)&quot; (??4NamedObject@nhe@@QAEAAV01@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp; __thiscall nhe::NamedObject::getName(void)const &quot; (?getName@NamedObject@nhe@@QBEABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;I:\Night Hawk\Night Hawk Engine\Debug\Night Hawk Engine.exe : fatal error LNK1169: Mindestens ein mehrfach definiertes Symbol gefunden.
</code></pre>
<p>Ich nutze aber ÜBERALL die nötigen Includeguards. Welche Gründe können solche Fehlermeldungen noch haben?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/158839/eigenartiger-fehler</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 02:20:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/158839.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 08 Sep 2006 20:08:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 20:12:17 GMT]]></title><description><![CDATA[<p>Ohne euch jetzt mal den Quellcode zu zeigen bekomme ich folgende Fehlermelung.<br />
(nicht wundern, XML Parser Quellcode ist aus der nature Application geklaut, aber umgeproggt)</p>
<pre><code>1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(wchar_t const *)&quot; (??0NamedObject@nhe@@QAE@PB_W@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class nhe::NamedObject const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::~NamedObject(void)&quot; (??1NamedObject@nhe@@QAE@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: class nhe::NamedObject &amp; __thiscall nhe::NamedObject::operator=(class nhe::NamedObject const &amp;)&quot; (??4NamedObject@nhe@@QAEAAV01@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;XMLParser.obj : error LNK2005: &quot;public: class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp; __thiscall nhe::NamedObject::getName(void)const &quot; (?getName@NamedObject@nhe@@QBEABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(wchar_t const *)&quot; (??0NamedObject@nhe@@QAE@PB_W@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::NamedObject(class nhe::NamedObject const &amp;)&quot; (??0NamedObject@nhe@@QAE@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: __thiscall nhe::NamedObject::~NamedObject(void)&quot; (??1NamedObject@nhe@@QAE@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: class nhe::NamedObject &amp; __thiscall nhe::NamedObject::operator=(class nhe::NamedObject const &amp;)&quot; (??4NamedObject@nhe@@QAEAAV01@ABV01@@Z) ist bereits in IOXMLObject.obj definiert.
1&gt;main.obj : error LNK2005: &quot;public: class std::basic_string&lt;wchar_t,struct std::char_traits&lt;wchar_t&gt;,class std::allocator&lt;wchar_t&gt; &gt; const &amp; __thiscall nhe::NamedObject::getName(void)const &quot; (?getName@NamedObject@nhe@@QBEABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) ist bereits in IOXMLObject.obj definiert.
1&gt;I:\Night Hawk\Night Hawk Engine\Debug\Night Hawk Engine.exe : fatal error LNK1169: Mindestens ein mehrfach definiertes Symbol gefunden.
</code></pre>
<p>Ich nutze aber ÜBERALL die nötigen Includeguards. Welche Gründe können solche Fehlermeldungen noch haben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133954</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133954</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Fri, 08 Sep 2006 20:12:17 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 20:25:47 GMT]]></title><description><![CDATA[<p>Includeguards helfen gegen mehrfache Deklarationen innerhalb einer Übersetzungseinheit, nicht gegen in mehreren Übersetzungseinheiten vorkommende Definitionen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133955</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Fri, 08 Sep 2006 20:25:47 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 20:46:32 GMT]]></title><description><![CDATA[<p>Das heißt für mich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133963</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Fri, 08 Sep 2006 20:46:32 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 21:51:32 GMT]]></title><description><![CDATA[<p>Definitionen in Headern entweder inline kennzeichnen oder in Implementationsdateien auslagern...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133992</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Fri, 08 Sep 2006 21:51:32 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:24:28 GMT]]></title><description><![CDATA[<p>Hi,<br />
Machs so:</p>
<p>Prototypes.h</p>
<pre><code class="language-cpp">#ifndef _PROTOTYPES_H_
#define _PROTOTYPES_H_

int GetIrgwas(void);
int GetNochwas(void);
int Berechne(int a, int b);

#endif /* _PROTOTYPES_H_ */
</code></pre>
<p>Definitions.cpp</p>
<pre><code class="language-cpp">int GetIrgwas(void)
{
   return (45);
}

int GetNochwas(void)
{
   return (2345);
}
int Berechne(int a, int b)
{
   return (a+b);
}
</code></pre>
<p>Alle Quellcodedateien, die eine Funktion verwenden, inkludieren lediglich 'Prototypes.h'.<br />
Damit sollte es funktionieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> .<br />
Hoffe das war verständlich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134010</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:24:28 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:34:29 GMT]]></title><description><![CDATA[<p>Sorry, ich habe nicht ganz verstanden, was du meinst.</p>
<p>Also, wenn ich in der C++ Datei, in der die Klasen und Members deklariert sind, die include des dazugehörigen Headers entferne, bekomme ich fehler(bla bla bla nicht deklariert)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134017</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:34:29 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:40:55 GMT]]></title><description><![CDATA[<p>Hier mal die Klasse:</p>
<pre><code class="language-cpp">#if !defined(__nhe_NamedObject_hpp__)
#define __nhe_NamedObject_hpp__

#include &quot;../StdTypes.hpp&quot;

namespace nhe
{

class NamedObject
{
protected:
	wString name_;

public:
	NamedObject(const nhwChar* name = nhNULL);
	NamedObject(const wString&amp; name);
	NamedObject(const NamedObject&amp;  other);

	~NamedObject(nhVoid);

	NamedObject&amp; operator =(const NamedObject&amp; other);

	inline nhVoid setName(const nhwChar* name);
	inline nhVoid setName(const wString&amp; name);

	const wString&amp; getName(nhVoid) const;
};

NamedObject::NamedObject(const nhwChar* name /* = nhNULL */)
{
	name_ = name;
}

NamedObject::NamedObject(const wString&amp; name)
{
	name_ = name;
}

NamedObject::NamedObject(const NamedObject&amp; other)
{
	if(this != &amp;other)
		name_ = other.name_;
}

NamedObject::~NamedObject(nhVoid)
{

}

NamedObject&amp; NamedObject::operator =(const NamedObject&amp; other)
{
	if(this != &amp;other)
		name_ = other.name_;

	return(*this);
}

inline nhVoid NamedObject::setName(const nhwChar* name)
{
	name_ = name;
}

inline nhVoid NamedObject::setName(const wString&amp; name)
{
	name_ = name;
}

const wString&amp; NamedObject::getName(nhVoid) const
{
	return(name_);
}

}

#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1134023</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134023</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:41:00 GMT]]></title><description><![CDATA[<p>Geht's was genauer?</p>
<p>Du musst Methoden, die Du deklarierst, entweder in einer .cpp Datei definieren, oder im Header als inline markieren, damit sie in der Linkage nicht mehrfach vorkommen...</p>
<pre><code class="language-cpp">// A.hpp
class A {
void X();
};

void A::X() {
} // blöd, besser in einer .cpp definieren
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1134024</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134024</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:46:43 GMT]]></title><description><![CDATA[<p>Tc++H schrieb:</p>
<blockquote>
<p>Sorry, ich habe nicht ganz verstanden, was du meinst.</p>
</blockquote>
<p>Nit schlimm <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ...Also:</p>
<p>Tc++H schrieb:</p>
<blockquote>
<p>[...]die include des dazugehörigen Headers entferne, bekomme ich fehler(bla bla bla nicht deklariert)</p>
</blockquote>
<p>Hm ich würde daraus und aus der geposteten Error-Log mal schließen, du hast alles in Headern gemacht...das ist...emmm kagge^^</p>
<p>Ok ich schreib dir nochmal n Beispiel mit Klassen:</p>
<p>CDemo.<strong>h</strong></p>
<pre><code class="language-cpp">class CDemo
{
   private:
     int _iData;
   public:
     CDemo(void);
     ~CDemo(void);

     int getData(void);
     void setData(int iNew);
}
</code></pre>
<p>CDemo.<strong>cpp</strong></p>
<pre><code class="language-cpp">#include &quot;CDemo.h&quot;

CDemo::CDemo(void)
{
}

CDemo::~CDemo(void)
{
}

int CDemo::getData(void)
{
   return (this-&gt;_iData);
}

void CDemo::setData(int iNew)
{
   this-&gt;_iData = iNew;
}
</code></pre>
<p>Hier ist's wieder genau so: Immer wenn du eine Quellcodedatei (*.cpp) hast, die die Klasse<br />
CDemo benötigt, inkludierst du einfach CDemo.h. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134028</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134028</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:54:11 GMT]]></title><description><![CDATA[<p>Danke, nochmal, Ich haber es jetzt so gemacht und der Fehler ist weg!!!</p>
<p>warum ist der Fehler sonst noch nie aufgetreten? Ich habe sonst oft alles im header definiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134031</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:54:11 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 22:56:29 GMT]]></title><description><![CDATA[<p>Tc++H schrieb:</p>
<blockquote>
<p>Danke, nochmal, <strong>Ich haber es jetzt so gemacht</strong> und der Fehler ist weg!!!</p>
</blockquote>
<p>Wie 'so' ?</p>
<p>Tc++H schrieb:</p>
<blockquote>
<p>warum ist der Fehler sonst noch nie aufgetreten? Ich habe sonst oft alles im header definiert.</p>
</blockquote>
<p>Dann haste wohl vorher die Defs in einem header nicht in mehreren *.cpp Dateien inkludiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134032</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134032</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Fri, 08 Sep 2006 22:56:29 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 23:14:05 GMT]]></title><description><![CDATA[<p>Noch eine kleine Frage: Kann es sein, dass der ganze Spaß bei templates nicht mehr Funktioniert? den wenn ich meine Singletonklasse auslagere, bekomme ich wieder stress:</p>
<pre><code class="language-cpp">#if !defined(__nhe_Singleton_hpp__)
#define __nhe_Singleton_hpp__

#include &quot;../StdTypes.hpp&quot;

namespace nhe
{

template&lt;class T_&gt;
class Singleton
{
private:
		// copy constructor
	Singleton(const Singleton&amp; other);
		// assignment operator
	Singleton&amp; operator =(const Singleton&amp; other);

protected:
		// constructor
	Singleton(nhVoid);
		// destructor
	virtual&amp; ~Singleton(nhVoid);

public:
	 static T_&amp; getInstance(nhVoid);
};

//-------------------------------------------------------------------------//
//
//-------------------------------------------------------------------------//
template&lt;class T_&gt; 
Singleton&lt;T_&gt;::Singleton(nhVoid)
{

}

//-------------------------------------------------------------------------//
//
//-------------------------------------------------------------------------//
template&lt;class T_&gt; 
Singleton&lt;T_&gt;::~Singleton(nhVoid)
{

}

//-------------------------------------------------------------------------//
//
//-------------------------------------------------------------------------//
template&lt;class T_&gt; 
T_&amp; Singleton&lt;T_&gt;::getInstance(nhVoid)
{
	static T_ instance_;

	return(instance_);
}

}

#endif
</code></pre>
<p>Ich hatte probiert, das Ding mit in eine *.cpp zu packen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134039</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134039</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Fri, 08 Sep 2006 23:14:05 GMT</pubDate></item><item><title><![CDATA[Reply to Eigenartiger Fehler... on Fri, 08 Sep 2006 23:20:12 GMT]]></title><description><![CDATA[<p>siehe <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39467.html" rel="nofollow">FAQ</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1134041</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1134041</guid><dc:creator><![CDATA[michba]]></dc:creator><pubDate>Fri, 08 Sep 2006 23:20:12 GMT</pubDate></item></channel></rss>