<?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[eigene compiler flags?]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe bisher noch nie eigene compiler flags benutzt. Wie mache ich das.<br />
Ich weiß dass ich code durch #if #elsif und #else einbauen kann aber wie compilier ich dann im richtigen mode?<br />
Wie muss ich mein makefile anpassen?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/196899/eigene-compiler-flags</link><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 18:27:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/196899.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Nov 2007 12:27:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to eigene compiler flags? on Sun, 04 Nov 2007 12:27:51 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe bisher noch nie eigene compiler flags benutzt. Wie mache ich das.<br />
Ich weiß dass ich code durch #if #elsif und #else einbauen kann aber wie compilier ich dann im richtigen mode?<br />
Wie muss ich mein makefile anpassen?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397426</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397426</guid><dc:creator><![CDATA[testo]]></dc:creator><pubDate>Sun, 04 Nov 2007 12:27:51 GMT</pubDate></item><item><title><![CDATA[Reply to eigene compiler flags? on Sun, 04 Nov 2007 12:48:58 GMT]]></title><description><![CDATA[<p>also ich dachte man kann die variable die für die bedingte kompilierung verantwortlich ist aus dem makefile heraus setzen? Geht das nicht? Kann ich die nur in meinem Programm über #define setzen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397438</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397438</guid><dc:creator><![CDATA[testo]]></dc:creator><pubDate>Sun, 04 Nov 2007 12:48:58 GMT</pubDate></item><item><title><![CDATA[Reply to eigene compiler flags? on Sun, 04 Nov 2007 12:53:07 GMT]]></title><description><![CDATA[<p>bei den meisten compiler sollte -Dmeinmacroname=meinmacro bzw. -Dmeinmacroname als parameter das machen, was du willst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397441</guid><dc:creator><![CDATA[ghorst]]></dc:creator><pubDate>Sun, 04 Nov 2007 12:53:07 GMT</pubDate></item><item><title><![CDATA[Reply to eigene compiler flags? on Sun, 04 Nov 2007 13:16:59 GMT]]></title><description><![CDATA[<p>Hmm...</p>
<p>also ich versuche das so:</p>
<pre><code class="language-cpp">#ifdef myvar
     //tue was
#else
     // tue was anderes
#endif
</code></pre>
<p>und im makefile dann als compilerflag -Dmyvar=0 oder -Dmyvar=1 , aber beides läuft bei mir nur in den if-zweig ???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1397454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397454</guid><dc:creator><![CDATA[testo]]></dc:creator><pubDate>Sun, 04 Nov 2007 13:16:59 GMT</pubDate></item><item><title><![CDATA[Reply to eigene compiler flags? on Sun, 04 Nov 2007 13:50:29 GMT]]></title><description><![CDATA[<p>is ja auch richtig. du prüfst, ob das makro definiert ist. das ist unabhängig davon, ob es 1 oder 0 ist. will heißen: wenn du -Dmeinmacro benutzt, ist meinmacro danach definiert.<br />
wenn du das mit 1 und 0 machen willst, geht das so:</p>
<pre><code class="language-cpp">#if myvar == 1
 [...]//code für myvar == 1
#elif myvar == 0
 [...]
#else
#error &quot;murks&quot;
#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1397475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1397475</guid><dc:creator><![CDATA[ghorst]]></dc:creator><pubDate>Sun, 04 Nov 2007 13:50:29 GMT</pubDate></item></channel></rss>