<?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[Linker Error...]]></title><description><![CDATA[<p>Hallo,<br />
ich bekomme einen Linker Error und weiß einfach nicht woran es liegt (ja ich weiß... Linker error sollte man schon selber rauskriegen, aber ich schaffs einfach nicht :()<br />
Habe den Code aus einem Tutorial und er sollte eigentlich nach meinem Wissen her funktionieren...</p>
<pre><code>Fehler	1	error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: static bool __cdecl Surface::OnDraw(struct SDL_Surface *,struct SDL_Surface *,int,int)&quot; (?OnDraw@Surface@@SA_NPAUSDL_Surface@@0HH@Z)&quot; in Funktion &quot;&quot;public: void __thiscall App::OnRender(void)&quot; (?OnRender@App@@QAEXXZ)&quot;.	OnRender.obj	SDL

Fehler	2	fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
</code></pre>
<p>OnRender.cpp</p>
<pre><code class="language-cpp">#include &quot;App.h&quot;

void App::OnRender()
{
        //Hier kracht es
        //Wenn ich es wegnehme, funktionierts
	Surface::OnDraw(surface, surfTest, 0, 0);

	SDL_Flip(surface);
}
</code></pre>
<p>Surface.cpp</p>
<pre><code class="language-cpp">#include &quot;Surface.h&quot;

Surface::Surface()
{}

SDL_Surface * Surface::OnLoad(const char *filename)
{
	SDL_Surface *surfTemp = NULL;
	SDL_Surface *surfRet = NULL;

	surfTemp = SDL_LoadBMP(filename);
	if(!surfTemp)
		return NULL;

	surfRet = SDL_DisplayFormat(surfTemp);

	SDL_FreeSurface(surfTemp);

	return surfRet;
}

bool OnDraw(SDL_Surface *surfDest, SDL_Surface *surfSrc, int x, int y)
{
	if(surfDest == NULL || surfSrc == 0)
		return false;

	SDL_Rect destRect;

	destRect.x = x;
	destRect.y = y;

	SDL_BlitSurface(surfSrc, NULL, surfDest, &amp;destRect);

	return true;
}
</code></pre>
<p>Surface.h</p>
<pre><code class="language-cpp">#ifndef Surface_h__
#define Surface_h__

#include &lt;SDL.h&gt;

class Surface
{
public:
	Surface();

	static SDL_Surface * OnLoad(const char *filename);
	static bool OnDraw(SDL_Surface *surfDest, SDL_Surface *surfSrc, int x, int y);
};

#endif // Surface_h__
</code></pre>
<p>Hoffe mir kann einer helfen und seid nicht zu hart zu mir <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/224907/linker-error</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 03:29:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/224907.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Oct 2008 14:59:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Linker Error... on Thu, 16 Oct 2008 14:59:55 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich bekomme einen Linker Error und weiß einfach nicht woran es liegt (ja ich weiß... Linker error sollte man schon selber rauskriegen, aber ich schaffs einfach nicht :()<br />
Habe den Code aus einem Tutorial und er sollte eigentlich nach meinem Wissen her funktionieren...</p>
<pre><code>Fehler	1	error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: static bool __cdecl Surface::OnDraw(struct SDL_Surface *,struct SDL_Surface *,int,int)&quot; (?OnDraw@Surface@@SA_NPAUSDL_Surface@@0HH@Z)&quot; in Funktion &quot;&quot;public: void __thiscall App::OnRender(void)&quot; (?OnRender@App@@QAEXXZ)&quot;.	OnRender.obj	SDL

Fehler	2	fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
</code></pre>
<p>OnRender.cpp</p>
<pre><code class="language-cpp">#include &quot;App.h&quot;

void App::OnRender()
{
        //Hier kracht es
        //Wenn ich es wegnehme, funktionierts
	Surface::OnDraw(surface, surfTest, 0, 0);

	SDL_Flip(surface);
}
</code></pre>
<p>Surface.cpp</p>
<pre><code class="language-cpp">#include &quot;Surface.h&quot;

Surface::Surface()
{}

SDL_Surface * Surface::OnLoad(const char *filename)
{
	SDL_Surface *surfTemp = NULL;
	SDL_Surface *surfRet = NULL;

	surfTemp = SDL_LoadBMP(filename);
	if(!surfTemp)
		return NULL;

	surfRet = SDL_DisplayFormat(surfTemp);

	SDL_FreeSurface(surfTemp);

	return surfRet;
}

bool OnDraw(SDL_Surface *surfDest, SDL_Surface *surfSrc, int x, int y)
{
	if(surfDest == NULL || surfSrc == 0)
		return false;

	SDL_Rect destRect;

	destRect.x = x;
	destRect.y = y;

	SDL_BlitSurface(surfSrc, NULL, surfDest, &amp;destRect);

	return true;
}
</code></pre>
<p>Surface.h</p>
<pre><code class="language-cpp">#ifndef Surface_h__
#define Surface_h__

#include &lt;SDL.h&gt;

class Surface
{
public:
	Surface();

	static SDL_Surface * OnLoad(const char *filename);
	static bool OnDraw(SDL_Surface *surfDest, SDL_Surface *surfSrc, int x, int y);
};

#endif // Surface_h__
</code></pre>
<p>Hoffe mir kann einer helfen und seid nicht zu hart zu mir <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1599989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1599989</guid><dc:creator><![CDATA[Speedy_92]]></dc:creator><pubDate>Thu, 16 Oct 2008 14:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to Linker Error... on Thu, 16 Oct 2008 15:06:48 GMT]]></title><description><![CDATA[<p>Du hast bei der Definition von <code>OnDraw</code> in der <code>Surface.cpp</code> ein <code>Surface::</code> vornedran vergessen <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="😉"
    /></p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1599992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1599992</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Thu, 16 Oct 2008 15:06:48 GMT</pubDate></item><item><title><![CDATA[Reply to Linker Error... on Thu, 16 Oct 2008 17:59:15 GMT]]></title><description><![CDATA[<p>Dravere schrieb:</p>
<blockquote>
<p>Du hast bei der Definition von <code>OnDraw</code> in der <code>Surface.cpp</code> ein <code>Surface::</code> vornedran vergessen <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="😉"
    /></p>
<p>Grüssli</p>
</blockquote>
<p>Danke ... immer wieder diese Flüchtigkeitsfehler <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /> <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/1600079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1600079</guid><dc:creator><![CDATA[Speedy_92]]></dc:creator><pubDate>Thu, 16 Oct 2008 17:59:15 GMT</pubDate></item></channel></rss>