<?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 Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren.]]></title><description><![CDATA[<p>Servus,</p>
<p>Ich möchte den Sourcecode von Anwendungen, die die SDL-Bibliothek verwenden.</p>
<p>Funktioniert mit der MSYS-Shell wirklich prima.</p>
<p>Ich möchte aber auch gerne die CMD-Shell zum kompilieren nutzten können, jedoch funktioniert das nicht wirklich, wenn ich folgendes in die Shell schreibe:</p>
<pre><code>LW:\Verzeichnis&gt; g++ main.cpp -o main `sdl-config --cflags --libs`
g++: `sdl-config: No such file or directory
cc1plus.exe: error: unrecognized command line option &quot;-fcflags&quot;
cc1plus.exe: error: unrecognized command line option &quot;-flibs`&quot;

LW:\Verzeichnis&gt;
</code></pre>
<p>Nun ist es ja so, dass die MSYS-Shell sämtliche Pfade und Umgebungszeug von MinGW im Vorraus weiß, d.h. ich muss für MSYS keine Umgebungsvariablen für Windows setzten.<br />
Nun da ich aber für &quot;normales&quot; Programmieren ohne SDL-Bibliothek nicht MSYS benutze sondern rein MinGW und die CMD-Shell.</p>
<p>Lange Rede - Kurzer Sinn. Ich will mit der CMD-Shell genauso wie mit der MSYS-Shell das SDL-Anwendungen kompilieren können.<br />
Ich habe auch shcon versucht statt nur &quot;<em>... `sdl-config ...</em>&quot; den kompletten Pfad zu der Datei hinzuschreiben.<br />
Was aufs gleiche hinausläuft, irgendwie auch logisch ich habe ja das MinGW/bin Verzeichnis in <em>PAHT</em> eingetragen.<br />
Auch wenn ich das ganze in einer MAKEFILE tarne will es nicht so, wie es soll.</p>
<blockquote>
<p>Target := SDLApp<br />
SUF = .exe<br />
Sources := main.cpp</p>
<p>USERCPPFLAGS =<br />
USERCXXFLAGS = -I/E/Programme/SDL/include<br />
USERLDFLAGS = -L/E/Programme/SDL/lib</p>
<p>CPPFLAGS = $(USERCPPFLAGS)<br />
CXXFLAGS = $(USERCXXFLAGS)<br />
LDFLAGS = $(USERLDFLAGS)</p>
<p>build:<br />
<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mo>(</mo><mi>w</mi><mi>a</mi><mi>r</mi><mi>n</mi><mi>i</mi><mi>n</mi><mi>g</mi><mi>B</mi><mi>u</mi><mi>i</mi><mi>l</mi><mi>d</mi><mi>i</mi><mi>n</mi><mi>g</mi><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mo>)</mo></mrow><annotation encoding="application/x-tex">(warning Building...)  
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.75em;"></span><span class="strut bottom" style="height:1em;vertical-align:-0.25em;"></span><span class="base textstyle uncramped"><span class="mopen">(</span><span class="mord mathit" style="margin-right:0.02691em;">w</span><span class="mord mathit">a</span><span class="mord mathit" style="margin-right:0.02778em;">r</span><span class="mord mathit">n</span><span class="mord mathit">i</span><span class="mord mathit">n</span><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mord mathit" style="margin-right:0.05017em;">B</span><span class="mord mathit">u</span><span class="mord mathit">i</span><span class="mord mathit" style="margin-right:0.01968em;">l</span><span class="mord mathit">d</span><span class="mord mathit">i</span><span class="mord mathit">n</span><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mclose">)</span></span></span></span>(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o <span class="katex"><span class="katex-mathml"><math><semantics><mrow><mo>(</mo><mi>T</mi><mi>a</mi><mi>r</mi><mi>g</mi><mi>e</mi><mi>t</mi><mo>)</mo></mrow><annotation encoding="application/x-tex">(Target)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.75em;"></span><span class="strut bottom" style="height:1em;vertical-align:-0.25em;"></span><span class="base textstyle uncramped"><span class="mopen">(</span><span class="mord mathit" style="margin-right:0.13889em;">T</span><span class="mord mathit">a</span><span class="mord mathit" style="margin-right:0.02778em;">r</span><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mord mathit">e</span><span class="mord mathit">t</span><span class="mclose">)</span></span></span></span>(SUF) $(LDFLAGS) `sdl-config --cflags --libs`</p>
</blockquote>
<p>Die <em>sdl-config</em> nervt mich ein wenig, da ohne dieser Datei offensichtlich nichts funktioniert, auch wenn ich so zimlich alle Libs dem Linker vor die Füße wirf, die irgendwas mit SDL zutun haben könnte (idR. sind das folgende Flags: <em>-lSDL, -lSDL_main</em> und <em>-lmingw32</em> (muss soweit ich weiß auch dazu))</p>
<p>Wisst ihr weiter?<br />
mfg RungAaz</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/270923/sdl-anwendungen-unter-windows-mit-mingw-und-der-cmd-shell-compilieren</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 19:17:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/270923.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jul 2010 11:46:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Tue, 20 Jul 2010 11:46:43 GMT]]></title><description><![CDATA[<p>Servus,</p>
<p>Ich möchte den Sourcecode von Anwendungen, die die SDL-Bibliothek verwenden.</p>
<p>Funktioniert mit der MSYS-Shell wirklich prima.</p>
<p>Ich möchte aber auch gerne die CMD-Shell zum kompilieren nutzten können, jedoch funktioniert das nicht wirklich, wenn ich folgendes in die Shell schreibe:</p>
<pre><code>LW:\Verzeichnis&gt; g++ main.cpp -o main `sdl-config --cflags --libs`
g++: `sdl-config: No such file or directory
cc1plus.exe: error: unrecognized command line option &quot;-fcflags&quot;
cc1plus.exe: error: unrecognized command line option &quot;-flibs`&quot;

LW:\Verzeichnis&gt;
</code></pre>
<p>Nun ist es ja so, dass die MSYS-Shell sämtliche Pfade und Umgebungszeug von MinGW im Vorraus weiß, d.h. ich muss für MSYS keine Umgebungsvariablen für Windows setzten.<br />
Nun da ich aber für &quot;normales&quot; Programmieren ohne SDL-Bibliothek nicht MSYS benutze sondern rein MinGW und die CMD-Shell.</p>
<p>Lange Rede - Kurzer Sinn. Ich will mit der CMD-Shell genauso wie mit der MSYS-Shell das SDL-Anwendungen kompilieren können.<br />
Ich habe auch shcon versucht statt nur &quot;<em>... `sdl-config ...</em>&quot; den kompletten Pfad zu der Datei hinzuschreiben.<br />
Was aufs gleiche hinausläuft, irgendwie auch logisch ich habe ja das MinGW/bin Verzeichnis in <em>PAHT</em> eingetragen.<br />
Auch wenn ich das ganze in einer MAKEFILE tarne will es nicht so, wie es soll.</p>
<blockquote>
<p>Target := SDLApp<br />
SUF = .exe<br />
Sources := main.cpp</p>
<p>USERCPPFLAGS =<br />
USERCXXFLAGS = -I/E/Programme/SDL/include<br />
USERLDFLAGS = -L/E/Programme/SDL/lib</p>
<p>CPPFLAGS = $(USERCPPFLAGS)<br />
CXXFLAGS = $(USERCXXFLAGS)<br />
LDFLAGS = $(USERLDFLAGS)</p>
<p>build:<br />
<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mo>(</mo><mi>w</mi><mi>a</mi><mi>r</mi><mi>n</mi><mi>i</mi><mi>n</mi><mi>g</mi><mi>B</mi><mi>u</mi><mi>i</mi><mi>l</mi><mi>d</mi><mi>i</mi><mi>n</mi><mi>g</mi><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mo>)</mo></mrow><annotation encoding="application/x-tex">(warning Building...)  
</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.75em;"></span><span class="strut bottom" style="height:1em;vertical-align:-0.25em;"></span><span class="base textstyle uncramped"><span class="mopen">(</span><span class="mord mathit" style="margin-right:0.02691em;">w</span><span class="mord mathit">a</span><span class="mord mathit" style="margin-right:0.02778em;">r</span><span class="mord mathit">n</span><span class="mord mathit">i</span><span class="mord mathit">n</span><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mord mathit" style="margin-right:0.05017em;">B</span><span class="mord mathit">u</span><span class="mord mathit">i</span><span class="mord mathit" style="margin-right:0.01968em;">l</span><span class="mord mathit">d</span><span class="mord mathit">i</span><span class="mord mathit">n</span><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mclose">)</span></span></span></span>(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o <span class="katex"><span class="katex-mathml"><math><semantics><mrow><mo>(</mo><mi>T</mi><mi>a</mi><mi>r</mi><mi>g</mi><mi>e</mi><mi>t</mi><mo>)</mo></mrow><annotation encoding="application/x-tex">(Target)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.75em;"></span><span class="strut bottom" style="height:1em;vertical-align:-0.25em;"></span><span class="base textstyle uncramped"><span class="mopen">(</span><span class="mord mathit" style="margin-right:0.13889em;">T</span><span class="mord mathit">a</span><span class="mord mathit" style="margin-right:0.02778em;">r</span><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mord mathit">e</span><span class="mord mathit">t</span><span class="mclose">)</span></span></span></span>(SUF) $(LDFLAGS) `sdl-config --cflags --libs`</p>
</blockquote>
<p>Die <em>sdl-config</em> nervt mich ein wenig, da ohne dieser Datei offensichtlich nichts funktioniert, auch wenn ich so zimlich alle Libs dem Linker vor die Füße wirf, die irgendwas mit SDL zutun haben könnte (idR. sind das folgende Flags: <em>-lSDL, -lSDL_main</em> und <em>-lmingw32</em> (muss soweit ich weiß auch dazu))</p>
<p>Wisst ihr weiter?<br />
mfg RungAaz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1929106</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1929106</guid><dc:creator><![CDATA[RungAaz]]></dc:creator><pubDate>Tue, 20 Jul 2010 11:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Tue, 20 Jul 2010 11:57:29 GMT]]></title><description><![CDATA[<p>Man möge mir für die große Anzahl meiner Rechtschreibfehler verzeihen, aber es gibt für unreigstrierte User keine solche Funktion.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1929112</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1929112</guid><dc:creator><![CDATA[RungAaz]]></dc:creator><pubDate>Tue, 20 Jul 2010 11:57:29 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Tue, 20 Jul 2010 12:07:35 GMT]]></title><description><![CDATA[<p>Also bei mir hat es mit folgendem Befehl gut geklappt</p>
<pre><code>gcc -I&quot;Pfad\zu\sdl\include&quot; -L&quot;pfad\zu\sdl\lib&quot; programm.c -lmingw32 -lSDL_main -lSDL -o programm
</code></pre>
<p>Frage mich aber nicht warum man mingw32 noch extra mit angeben muss^^ .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1929117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1929117</guid><dc:creator><![CDATA[player4245]]></dc:creator><pubDate>Tue, 20 Jul 2010 12:07:35 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Tue, 20 Jul 2010 12:14:32 GMT]]></title><description><![CDATA[<p>Ruf mal in der cmd einfach sdl-config --cflags --libs auf. Das Ergebnis setzt du anstatt des Aufrufs `sdl-config --cflags --libs` bei g++ ein.</p>
<p>Lars</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1929118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1929118</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Tue, 20 Jul 2010 12:14:32 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Tue, 20 Jul 2010 14:44:04 GMT]]></title><description><![CDATA[<p>Vielen, vielen, herzlichen Dank!</p>
<p>Mit folgender Zeile hab ich es jetzt doch noch zum Laufen gebracht:</p>
<pre><code>g++  -IE:/Programme/SDL/include main.cpp -o HelloWorld.exe -LE:/Programme/SDL/lib -lmingw32 -lSDLmain -lSDL
</code></pre>
<p>Als ich es früher probiert habe damit zu kompilieren, habe ich statt <strong>-lSDLmain</strong> <em>-lSDL</em>*_*<em>main</em> geschrieben, was dazu führte, dass Make die Bibliothek nicht gefunden hat.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/1086">@Lars</a><br />
Die MSYS-Shell spuckt mir folgendes bei <em>sdl-config --cflags --libs</em> aus:</p>
<pre><code>-I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main
-L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows
</code></pre>
<p>Half mir leider für die CMD-Shell nicht wirklich weiter, da ich absolut keinen Peil habe, wo bei mir &quot;usr/local/bin&quot; ist, zumindest habe ich in dem MSYS Verzeichnis nichts dergleichen gefunden.</p>
<p>mfg RungAaz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1929209</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1929209</guid><dc:creator><![CDATA[RungAaz]]></dc:creator><pubDate>Tue, 20 Jul 2010 14:44:04 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Tue, 20 Jul 2010 18:03:51 GMT]]></title><description><![CDATA[<p>Allerdings fällt mir auf, dass nun beim Starten der Anwendung ein Konsolenfenster erscheint. Kann man das irgendwie deaktivieren?</p>
<p>mfg RungAaz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1929295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1929295</guid><dc:creator><![CDATA[RungAaz]]></dc:creator><pubDate>Tue, 20 Jul 2010 18:03:51 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Thu, 14 May 2015 08:08:57 GMT]]></title><description><![CDATA[<p>Nun dafür musst du -mwindows wegnehmen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2453477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2453477</guid><dc:creator><![CDATA[Simonmicro]]></dc:creator><pubDate>Thu, 14 May 2015 08:08:57 GMT</pubDate></item><item><title><![CDATA[Reply to SDL Anwendungen unter Windows mit MinGW und der CMD-Shell compilieren. on Thu, 14 May 2015 08:38:50 GMT]]></title><description><![CDATA[<p>Deinen Enthusiasmus in Ehren, aber anscheinend hat das für 5 Jahre lang niemanden so sehr interessiert, dass er noch einmal nachgefragt hätte <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/2453482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2453482</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Thu, 14 May 2015 08:38:50 GMT</pubDate></item></channel></rss>