<?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[Präprozessoranweisung wird übersprungen]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich verwende für mein main-Programm eine project.lib (enthält u.a. die Klasse KlasseX).</p>
<p>Wenn ich eine Methode der KlasseX in einem Hauptprogramm durchführe (Pfade von project.lib und include-files sind natürlich gesetzt) und debugge, springe ich in folgende Zeilen rein:</p>
<pre><code class="language-cpp">string
KlasseX
::mf_extractPath(const string &amp;a_sPath)
{
 string t_sSlash;
 #ifdef LT_LINUX
  t_sSlash.assign(&quot;/&quot;);
 #elif LT_WINDOWS
  t_sSlash.assign(&quot;\&quot;);
 #endif
    string::size_type t_sLast = a_sPath.find_last_of(t_sSlash.c_str());
    if(t_sLast != string::npos){
	return(a_sPath.substr(t_sLast+1));
    }
    else
         return(a_sPath.c_str());
}
</code></pre>
<p>Projekteinstellungen für mein main-Programm:<br />
C++ -&gt; Präprozessor-Definitionen LT_WINDOWS</p>
<p>Projekteinstellungen beim Erstellen der project.lib:<br />
C++ -&gt; Präprozessor-Definitionen: keine Angabe von LT_WINDOWS,LT_LINUX</p>
<p>Mein Problem:<br />
Wenn ich debugge springt mein Curser in der Methode mf_extractPath(..) nicht in die Bedingung LT_WINDOWS rein!!!</p>
<p>Was hab ich falsch eingegeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/71703/präprozessoranweisung-wird-übersprungen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 14:13:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/71703.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Apr 2004 06:52:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Präprozessoranweisung wird übersprungen on Wed, 21 Apr 2004 06:53:23 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich verwende für mein main-Programm eine project.lib (enthält u.a. die Klasse KlasseX).</p>
<p>Wenn ich eine Methode der KlasseX in einem Hauptprogramm durchführe (Pfade von project.lib und include-files sind natürlich gesetzt) und debugge, springe ich in folgende Zeilen rein:</p>
<pre><code class="language-cpp">string
KlasseX
::mf_extractPath(const string &amp;a_sPath)
{
 string t_sSlash;
 #ifdef LT_LINUX
  t_sSlash.assign(&quot;/&quot;);
 #elif LT_WINDOWS
  t_sSlash.assign(&quot;\&quot;);
 #endif
    string::size_type t_sLast = a_sPath.find_last_of(t_sSlash.c_str());
    if(t_sLast != string::npos){
	return(a_sPath.substr(t_sLast+1));
    }
    else
         return(a_sPath.c_str());
}
</code></pre>
<p>Projekteinstellungen für mein main-Programm:<br />
C++ -&gt; Präprozessor-Definitionen LT_WINDOWS</p>
<p>Projekteinstellungen beim Erstellen der project.lib:<br />
C++ -&gt; Präprozessor-Definitionen: keine Angabe von LT_WINDOWS,LT_LINUX</p>
<p>Mein Problem:<br />
Wenn ich debugge springt mein Curser in der Methode mf_extractPath(..) nicht in die Bedingung LT_WINDOWS rein!!!</p>
<p>Was hab ich falsch eingegeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/505770</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/505770</guid><dc:creator><![CDATA[ga_un]]></dc:creator><pubDate>Wed, 21 Apr 2004 06:53:23 GMT</pubDate></item><item><title><![CDATA[Reply to Präprozessoranweisung wird übersprungen on Wed, 21 Apr 2004 07:55:45 GMT]]></title><description><![CDATA[<p>Wo befindet sich dieser source? Ich gehe mal davon aus, das in nem cpp file der lib befindet. Bei der compilierung der lib ist keines der beiden symbole defniert, er macht also nichts ( wär ein #error &quot;LT_LINUX oder LT_WINDOW muss defniert werden&quot; falls keines der beiden definiert ist nicht sinnvoll?). <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>
]]></description><link>https://www.c-plusplus.net/forum/post/505802</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/505802</guid><dc:creator><![CDATA[CMatt]]></dc:creator><pubDate>Wed, 21 Apr 2004 07:55:45 GMT</pubDate></item><item><title><![CDATA[Reply to Präprozessoranweisung wird übersprungen on Wed, 21 Apr 2004 08:29:55 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wenn ich die project.lib kompiliere und in Projekteinstellungen-&gt;C++-&gt;Präprozessordefinitionen LT_WINDOWS angebe, bekomme ich folgende Fehlermeldung:</p>
<pre><code class="language-cpp">//...
#ifdef LT_LINUX
  t_sSlash.assign(&quot;/&quot;);
#elif LT_WINDOWS
  t_sSlash.assign(&quot;\&quot;);  // error C2001: Zeilenumbruch innerhalb einer Konstanten

#endif
  string::size_type t_sLast = a_sPath.find_last_of(t_sSlash.c_str()); // error C2143: Syntaxfehler : Fehlendes ')' vor 'tag::id'

  if(t_sLast != string::npos){ // error C2065: 't_sLast' : nichtdeklarierter Bezeichner
      return(a_sPath.substr(t_sLast+1));
  } else
      return(a_sPath.c_str());
//...
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/505819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/505819</guid><dc:creator><![CDATA[ga_un]]></dc:creator><pubDate>Wed, 21 Apr 2004 08:29:55 GMT</pubDate></item><item><title><![CDATA[Reply to Präprozessoranweisung wird übersprungen on Wed, 21 Apr 2004 10:21:46 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Vorsicht vor &quot;Escape-Sequenzen&quot;, kann man da nur sagen:</p>
<p>[cpp]<br />
#ifdef LT_LINUX<br />
t_sSlash.assign(&quot;/&quot;);<br />
#elif LT_WINDOWS<br />
<strong>t_sSlash.assign(&quot;\&quot;);</strong><br />
[/cpp]</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/505908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/505908</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Wed, 21 Apr 2004 10:21:46 GMT</pubDate></item><item><title><![CDATA[Reply to Präprozessoranweisung wird übersprungen on Wed, 21 Apr 2004 10:29:54 GMT]]></title><description><![CDATA[<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/505916</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/505916</guid><dc:creator><![CDATA[ga_un]]></dc:creator><pubDate>Wed, 21 Apr 2004 10:29:54 GMT</pubDate></item><item><title><![CDATA[Reply to Präprozessoranweisung wird übersprungen on Wed, 21 Apr 2004 10:34:11 GMT]]></title><description><![CDATA[<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/505922</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/505922</guid><dc:creator><![CDATA[ga_un]]></dc:creator><pubDate>Wed, 21 Apr 2004 10:34:11 GMT</pubDate></item></channel></rss>