<?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[SDL 3 Kompilierungsfehler]]></title><description><![CDATA[<p>Moin!</p>
<p>Folgenden Code habe ich:</p>
<pre><code class="language-cpp">
#include &lt;SDL3/SDL.h&gt;
#define SDL_MAIN_USE_CALLBACKS
#include &lt;SDL3/SDL_main.h&gt;

// This function runs once at startup
SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[])
{
	SDL_Log(&quot;Init&quot;);
	// Continue running the application
	return SDL_APP_CONTINUE;
}

// This function runs when a new event (mouse input, keypresses, etc) occurs
SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
{
	SDL_Log(&quot;Event&quot;);
	switch (event-&gt;type)
	{
	case SDL_EVENT_QUIT:
		// Quit the application with a success state
		return SDL_APP_SUCCESS;
	default:
		// Continue running the application
		return SDL_APP_CONTINUE;
	}
}

// This function runs once per frame, and is the heart of the application
SDL_AppResult SDL_AppIterate(void* appstate)
{
	SDL_Log(&quot;Iterate&quot;);
	// Continue running the application
	return SDL_APP_CONTINUE;
}

// This function runs once at shutdown
void SDL_AppQuit(void* appstate, SDL_AppResult result)
{
	SDL_Log(&quot;Quit&quot;);
}
</code></pre>
<p>Leider bekomme ich beim kompilieren den Fehler, dass &quot;SDL_main&quot; fehlt.<br />
Ohne main (&quot;Haupt Klasse&quot;) kann man dies nicht übersetzen (ist nachvollziebar).</p>
<p>Leider fand ich bisher keine Lösung im Internet dafür.<br />
Vielleicht hat jemand hier eine Idee?</p>
<p>Vielen Dank im Voraus!</p>
<p>Grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/355487/sdl-3-kompilierungsfehler</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 17:54:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/355487.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Aug 2026 14:50:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SDL 3 Kompilierungsfehler on Mon, 24 Aug 2026 14:50:43 GMT]]></title><description><![CDATA[<p>Moin!</p>
<p>Folgenden Code habe ich:</p>
<pre><code class="language-cpp">
#include &lt;SDL3/SDL.h&gt;
#define SDL_MAIN_USE_CALLBACKS
#include &lt;SDL3/SDL_main.h&gt;

// This function runs once at startup
SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[])
{
	SDL_Log(&quot;Init&quot;);
	// Continue running the application
	return SDL_APP_CONTINUE;
}

// This function runs when a new event (mouse input, keypresses, etc) occurs
SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
{
	SDL_Log(&quot;Event&quot;);
	switch (event-&gt;type)
	{
	case SDL_EVENT_QUIT:
		// Quit the application with a success state
		return SDL_APP_SUCCESS;
	default:
		// Continue running the application
		return SDL_APP_CONTINUE;
	}
}

// This function runs once per frame, and is the heart of the application
SDL_AppResult SDL_AppIterate(void* appstate)
{
	SDL_Log(&quot;Iterate&quot;);
	// Continue running the application
	return SDL_APP_CONTINUE;
}

// This function runs once at shutdown
void SDL_AppQuit(void* appstate, SDL_AppResult result)
{
	SDL_Log(&quot;Quit&quot;);
}
</code></pre>
<p>Leider bekomme ich beim kompilieren den Fehler, dass &quot;SDL_main&quot; fehlt.<br />
Ohne main (&quot;Haupt Klasse&quot;) kann man dies nicht übersetzen (ist nachvollziebar).</p>
<p>Leider fand ich bisher keine Lösung im Internet dafür.<br />
Vielleicht hat jemand hier eine Idee?</p>
<p>Vielen Dank im Voraus!</p>
<p>Grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2625121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2625121</guid><dc:creator><![CDATA[no_name1991]]></dc:creator><pubDate>Mon, 24 Aug 2026 14:50:43 GMT</pubDate></item></channel></rss>