<?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[Verweis auf nicht aufgelöstes externes Symbol]]></title><description><![CDATA[<p>Hey.</p>
<p>Stehe grad irgendwie auf dem Schlauch.<br />
Finde mein symbol nicht, welches nicht aufgelöst sein soll.</p>
<p>AbtractGladiator.h</p>
<pre><code class="language-cpp">#ifndef _AbstractGladiator_h_
#define _AbstractGladiator_h_

#include &quot;Armors\AbstractArmor.h&quot;
#include &quot;Weappons\AbstractWeappon.h&quot;
#include &quot;..\..\Helper\Math.h&quot;

typedef unsigned int UINT;

enum GLADIATOR_TYPE
{
	GLADIATOR_VERSUS,
	GLADIATOR_MAGNUS,
	GLADIATOR_PRISCUS,
};

class CAbstractGladiator
{
protected:	
	GLADIATOR_TYPE	m_type;		
	unsigned int	m_iBody;							//1,2,3
	unsigned int	m_iLevel;
	unsigned int	m_iPg;								//progressPoints
	unsigned int	m_iCurProtection;
	unsigned int	m_iMaxProtection;
	unsigned int	m_iSpecialAbilityAmount;
	unsigned int	m_iSpecialAbilityAmountInArena;		//max ist 3

	CAbstractArmor		m_aArmor[4];					//max 4 aromor pices avilable
	CAbstractWeappon	m_Weappons[9];					//max 9 weappon pices avilable

public:
	CAbstractGladiator(	GLADIATOR_TYPE type, UINT iBody, UINT iLevel, UINT iPg, UINT iCurProtection, UINT iMaxProtection, UINT iSpezialAbilityAmount,
						CAbstractArmor* pArmor[4], CAbstractWeappon* pWeappon[9])
	{
		m_type							= type;
		m_iBody							= iBody;
		m_iLevel						= iLevel;
		m_iPg							= iPg;
		m_iCurProtection				= iCurProtection;
		m_iMaxProtection				= iMaxProtection;
		m_iSpecialAbilityAmount			= iSpezialAbilityAmount;
		m_iSpecialAbilityAmountInArena	= CMath::Clamp&lt;unsigned int&gt;(iSpezialAbilityAmount, 0, 3);

		for(int i = 0 ; i &lt; 4 ; i++)
		{
			m_aArmor[i] = *pArmor[i];
		}

		for(int i = 0 ; i &lt; 9 ; i++)
		{
			m_Weappons[i] = *pWeappon[i];
		}
	}

	virtual void SetGladiatorType(GLADIATOR_TYPE type)						{ m_type = type; }
	virtual GLADIATOR_TYPE GetGladiatorType()								{ return m_type; }

	virtual void SetGladiatorLevel(unsigned int iLevel)						{ m_iLevel = iLevel; }
	virtual unsigned int GetGladiatorLevel()								{ return m_iLevel; }

	virtual void SetGladiatorBody(unsigned int iBody)						{ m_iBody = iBody; }
	virtual unsigned int GetGladiatorBody()									{ return m_iBody; }

	virtual void SetGladiatorPg(unsigned int iPg)							{ m_iPg = iPg; }
	virtual unsigned int GetGladiatorPg()									{ return m_iPg; }

	virtual void SetGladiatorCurProtection(unsigned int iCurProtection)		{ m_iCurProtection = iCurProtection; }
	virtual unsigned int GetGladiatorCurProtection()						{ return m_iCurProtection; }

	virtual void SetGladiatorMaxProtection(unsigned int iMaxProtection)		{ m_iMaxProtection = iMaxProtection; }
	virtual unsigned int GtGladiatorMaxProtection()							{ return m_iMaxProtection; }

	virtual void SetGladiatorSpecialAbilityAmount(unsigned int iVal)		{ m_iSpecialAbilityAmount = iVal; }
	virtual unsigned int GetGladiatorSpecialAbilityAmount()					{ return m_iSpecialAbilityAmount; }

	virtual void SetGladiatorSpecialAbilityAmountInArena(unsigned int iVal)	{ m_iSpecialAbilityAmountInArena = iVal; }
	virtual unsigned int GetGladiatorSpecialAbilityAmountInArena()			{ return m_iSpecialAbilityAmountInArena; }

};

#endif//_AbstractGladiator_h_
</code></pre>
<p>Math.h</p>
<pre><code class="language-cpp">#ifndef _Math_h_
#define _Math_h_

class CMath
{
public:
	template&lt;typename T&gt;
	static T Clamp(T val, T min, T max);

};

#endif//_Math_h_
</code></pre>
<p>Math.cpp</p>
<pre><code class="language-cpp">#include &quot;Math.h&quot;

template&lt;typename T&gt;
T CMath::Clamp(T val, T min, T max)
{
	if(val &lt; min) return min;
	if(val &gt; max) return max;

	return val;
}
</code></pre>
<p>Fehlermeldung</p>
<pre><code>Fehler	1	error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: static unsigned int __cdecl CMath::Clamp&lt;unsigned int&gt;(unsigned int,unsigned int,unsigned int)&quot; (??$Clamp@I@CMath@@SAIIII@Z)&quot; in Funktion &quot;&quot;public: __thiscall CAbstractGladiator::CAbstractGladiator(enum GLADIATOR_TYPE,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class CAbstractArmor * * const,class CAbstractWeappon * * const)&quot; (??0CAbstractGladiator@@QAE@W4GLADIATOR_TYPE@@IIIIIIQAPAVCAbstractArmor@@QAPAVCAbstractWeappon@@@Z)&quot;.	Main.obj
</code></pre>
<p>Ich bin mir sicher, dass es nur ne Kleinigkeit ist, aber irgendwie schaffe ich es gerade nicht den Fehler zu finden.</p>
<p>mfg Darter</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/304113/verweis-auf-nicht-aufgelöstes-externes-symbol</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 00:49:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/304113.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 May 2012 19:42:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Verweis auf nicht aufgelöstes externes Symbol on Tue, 29 May 2012 19:43:19 GMT]]></title><description><![CDATA[<p>Hey.</p>
<p>Stehe grad irgendwie auf dem Schlauch.<br />
Finde mein symbol nicht, welches nicht aufgelöst sein soll.</p>
<p>AbtractGladiator.h</p>
<pre><code class="language-cpp">#ifndef _AbstractGladiator_h_
#define _AbstractGladiator_h_

#include &quot;Armors\AbstractArmor.h&quot;
#include &quot;Weappons\AbstractWeappon.h&quot;
#include &quot;..\..\Helper\Math.h&quot;

typedef unsigned int UINT;

enum GLADIATOR_TYPE
{
	GLADIATOR_VERSUS,
	GLADIATOR_MAGNUS,
	GLADIATOR_PRISCUS,
};

class CAbstractGladiator
{
protected:	
	GLADIATOR_TYPE	m_type;		
	unsigned int	m_iBody;							//1,2,3
	unsigned int	m_iLevel;
	unsigned int	m_iPg;								//progressPoints
	unsigned int	m_iCurProtection;
	unsigned int	m_iMaxProtection;
	unsigned int	m_iSpecialAbilityAmount;
	unsigned int	m_iSpecialAbilityAmountInArena;		//max ist 3

	CAbstractArmor		m_aArmor[4];					//max 4 aromor pices avilable
	CAbstractWeappon	m_Weappons[9];					//max 9 weappon pices avilable

public:
	CAbstractGladiator(	GLADIATOR_TYPE type, UINT iBody, UINT iLevel, UINT iPg, UINT iCurProtection, UINT iMaxProtection, UINT iSpezialAbilityAmount,
						CAbstractArmor* pArmor[4], CAbstractWeappon* pWeappon[9])
	{
		m_type							= type;
		m_iBody							= iBody;
		m_iLevel						= iLevel;
		m_iPg							= iPg;
		m_iCurProtection				= iCurProtection;
		m_iMaxProtection				= iMaxProtection;
		m_iSpecialAbilityAmount			= iSpezialAbilityAmount;
		m_iSpecialAbilityAmountInArena	= CMath::Clamp&lt;unsigned int&gt;(iSpezialAbilityAmount, 0, 3);

		for(int i = 0 ; i &lt; 4 ; i++)
		{
			m_aArmor[i] = *pArmor[i];
		}

		for(int i = 0 ; i &lt; 9 ; i++)
		{
			m_Weappons[i] = *pWeappon[i];
		}
	}

	virtual void SetGladiatorType(GLADIATOR_TYPE type)						{ m_type = type; }
	virtual GLADIATOR_TYPE GetGladiatorType()								{ return m_type; }

	virtual void SetGladiatorLevel(unsigned int iLevel)						{ m_iLevel = iLevel; }
	virtual unsigned int GetGladiatorLevel()								{ return m_iLevel; }

	virtual void SetGladiatorBody(unsigned int iBody)						{ m_iBody = iBody; }
	virtual unsigned int GetGladiatorBody()									{ return m_iBody; }

	virtual void SetGladiatorPg(unsigned int iPg)							{ m_iPg = iPg; }
	virtual unsigned int GetGladiatorPg()									{ return m_iPg; }

	virtual void SetGladiatorCurProtection(unsigned int iCurProtection)		{ m_iCurProtection = iCurProtection; }
	virtual unsigned int GetGladiatorCurProtection()						{ return m_iCurProtection; }

	virtual void SetGladiatorMaxProtection(unsigned int iMaxProtection)		{ m_iMaxProtection = iMaxProtection; }
	virtual unsigned int GtGladiatorMaxProtection()							{ return m_iMaxProtection; }

	virtual void SetGladiatorSpecialAbilityAmount(unsigned int iVal)		{ m_iSpecialAbilityAmount = iVal; }
	virtual unsigned int GetGladiatorSpecialAbilityAmount()					{ return m_iSpecialAbilityAmount; }

	virtual void SetGladiatorSpecialAbilityAmountInArena(unsigned int iVal)	{ m_iSpecialAbilityAmountInArena = iVal; }
	virtual unsigned int GetGladiatorSpecialAbilityAmountInArena()			{ return m_iSpecialAbilityAmountInArena; }

};

#endif//_AbstractGladiator_h_
</code></pre>
<p>Math.h</p>
<pre><code class="language-cpp">#ifndef _Math_h_
#define _Math_h_

class CMath
{
public:
	template&lt;typename T&gt;
	static T Clamp(T val, T min, T max);

};

#endif//_Math_h_
</code></pre>
<p>Math.cpp</p>
<pre><code class="language-cpp">#include &quot;Math.h&quot;

template&lt;typename T&gt;
T CMath::Clamp(T val, T min, T max)
{
	if(val &lt; min) return min;
	if(val &gt; max) return max;

	return val;
}
</code></pre>
<p>Fehlermeldung</p>
<pre><code>Fehler	1	error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: static unsigned int __cdecl CMath::Clamp&lt;unsigned int&gt;(unsigned int,unsigned int,unsigned int)&quot; (??$Clamp@I@CMath@@SAIIII@Z)&quot; in Funktion &quot;&quot;public: __thiscall CAbstractGladiator::CAbstractGladiator(enum GLADIATOR_TYPE,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,class CAbstractArmor * * const,class CAbstractWeappon * * const)&quot; (??0CAbstractGladiator@@QAE@W4GLADIATOR_TYPE@@IIIIIIQAPAVCAbstractArmor@@QAPAVCAbstractWeappon@@@Z)&quot;.	Main.obj
</code></pre>
<p>Ich bin mir sicher, dass es nur ne Kleinigkeit ist, aber irgendwie schaffe ich es gerade nicht den Fehler zu finden.</p>
<p>mfg Darter</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2217014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2217014</guid><dc:creator><![CDATA[Darter]]></dc:creator><pubDate>Tue, 29 May 2012 19:43:19 GMT</pubDate></item><item><title><![CDATA[Reply to Verweis auf nicht aufgelöstes externes Symbol on Tue, 29 May 2012 19:47:24 GMT]]></title><description><![CDATA[<p>Schau mal unter <a href="http://www.c-plusplus.net/forum/151578" rel="nofollow">Haufig gestellte Fragen</a> bei Punkt 5.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2217016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2217016</guid><dc:creator><![CDATA[icarus2]]></dc:creator><pubDate>Tue, 29 May 2012 19:47:24 GMT</pubDate></item><item><title><![CDATA[Reply to Verweis auf nicht aufgelöstes externes Symbol on Tue, 29 May 2012 20:31:15 GMT]]></title><description><![CDATA[<p>Hey, ich gehe davon aus, du meinst Punkt 5</p>
<p>Ok, habs mir durchgelesen, und ich war mir eig. ziehmlich sicher, dass templates auch in der cpp definieren könnte, habe ich mich wohl getäuscht. Da ich aber selten templates verwende, sei mir der Fehler hoffentlich verziehen.</p>
<p>Also schnell die definition direkt in die Klasse gepackt, jedoch still the same.</p>
<p>Edit: dein Edit erst jetzt gesehen, habe ja aber gefunden was du meinst <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/2217018</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2217018</guid><dc:creator><![CDATA[Darter]]></dc:creator><pubDate>Tue, 29 May 2012 20:31:15 GMT</pubDate></item><item><title><![CDATA[Reply to Verweis auf nicht aufgelöstes externes Symbol on Wed, 30 May 2012 09:34:41 GMT]]></title><description><![CDATA[<p>Darter schrieb:</p>
<blockquote>
<p>Also schnell die definition direkt in die Klasse gepackt, jedoch still the same.</p>
</blockquote>
<p>Dann liefere uns mal ein compilierbares minimales Beispiel, das den Fehler reproduzierbar macht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2217156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2217156</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Wed, 30 May 2012 09:34:41 GMT</pubDate></item></channel></rss>