<?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 Warnung] Pubdule symbol &#x27;_triangle&#x27; defined in both Unit1.obj and Unit2.obj]]></title><description><![CDATA[<p>Hallo!<br />
Habe folgendes Problem, habe eine (selbstgeschriebene) Headerdatei const.h in der unter anderem auch der AnsiString &quot;triangle&quot; deklariert und definiert wird, nun zeigt mir aber der Linker bei fast jeder Variablen aus der const.h <strong>2</strong> solche Fehlermeldung an. Und zwar meistens in der UNIT1.OBJ und UNIT2.OBJ und die zweite UNIT1.OBJ und UNIT4.OBJ</p>
<p>Hab auch schon mal gegooglet und kam auf den Thread &quot;Verschachtelung zu tief...&quot; oder so was, dort wurde von Akari Include Guards vorgeschlagen, diese hab ich dann auch verwendet es blieb sich jedoch alles gleich.<br />
Könnte mir vielleicht jemand sagen, was sein könnte?</p>
<p>const.h:</p>
<pre><code class="language-cpp">#ifndef ConstH
#define ConstH

//Konstanten
const AnsiString white=&quot;images\\white.bmp&quot;;
const AnsiString cross=&quot;images\\cross.bmp&quot;;
const AnsiString circle=&quot;images\\circle.bmp&quot;;
const AnsiString square=&quot;images\\square.bmp&quot;;
const AnsiString triangle=&quot;images\\triangle.bmp&quot;;

AnsiString Symbol = &quot;&quot;;
AnsiString Symbol2 = &quot;&quot;;  //symbols of the user, initialized in constructor of MainForm

int actual_player; //initialized (random) first in constructor
/* values:  0.....1st player
            1.....2nd player or bot*/

const int offsetx = 45;
const int offsety = 30; //offset of the field in the form

int type;
/* values type:
        0... Multiplayer
        1... Singleplayer
*/

int botdifficulty = 800;
/*difficulty of the BOT:
0...normal
1...undefeatable*/

int startplayer = 5;
/* defines which player started the game, needed for the bot-KI
0...Player1
1...Bot (or Player2, but this isn't important)*/

#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/203765/linker-warnung-pubdule-symbol-_triangle-defined-in-both-unit1-obj-and-unit2-obj</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 11:35:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/203765.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jan 2008 10:03:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Linker Warnung] Pubdule symbol &#x27;_triangle&#x27; defined in both Unit1.obj and Unit2.obj on Sat, 26 Jan 2008 10:03:53 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Habe folgendes Problem, habe eine (selbstgeschriebene) Headerdatei const.h in der unter anderem auch der AnsiString &quot;triangle&quot; deklariert und definiert wird, nun zeigt mir aber der Linker bei fast jeder Variablen aus der const.h <strong>2</strong> solche Fehlermeldung an. Und zwar meistens in der UNIT1.OBJ und UNIT2.OBJ und die zweite UNIT1.OBJ und UNIT4.OBJ</p>
<p>Hab auch schon mal gegooglet und kam auf den Thread &quot;Verschachtelung zu tief...&quot; oder so was, dort wurde von Akari Include Guards vorgeschlagen, diese hab ich dann auch verwendet es blieb sich jedoch alles gleich.<br />
Könnte mir vielleicht jemand sagen, was sein könnte?</p>
<p>const.h:</p>
<pre><code class="language-cpp">#ifndef ConstH
#define ConstH

//Konstanten
const AnsiString white=&quot;images\\white.bmp&quot;;
const AnsiString cross=&quot;images\\cross.bmp&quot;;
const AnsiString circle=&quot;images\\circle.bmp&quot;;
const AnsiString square=&quot;images\\square.bmp&quot;;
const AnsiString triangle=&quot;images\\triangle.bmp&quot;;

AnsiString Symbol = &quot;&quot;;
AnsiString Symbol2 = &quot;&quot;;  //symbols of the user, initialized in constructor of MainForm

int actual_player; //initialized (random) first in constructor
/* values:  0.....1st player
            1.....2nd player or bot*/

const int offsetx = 45;
const int offsety = 30; //offset of the field in the form

int type;
/* values type:
        0... Multiplayer
        1... Singleplayer
*/

int botdifficulty = 800;
/*difficulty of the BOT:
0...normal
1...undefeatable*/

int startplayer = 5;
/* defines which player started the game, needed for the bot-KI
0...Player1
1...Bot (or Player2, but this isn't important)*/

#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1443896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443896</guid><dc:creator><![CDATA[o*amp*oler]]></dc:creator><pubDate>Sat, 26 Jan 2008 10:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to [Linker Warnung] Pubdule symbol &#x27;_triangle&#x27; defined in both Unit1.obj and Unit2.obj on Sat, 26 Jan 2008 11:46:25 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Schau dich nach dem Stichwort extern um.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443929</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 26 Jan 2008 11:46:25 GMT</pubDate></item><item><title><![CDATA[Reply to [Linker Warnung] Pubdule symbol &#x27;_triangle&#x27; defined in both Unit1.obj and Unit2.obj on Sat, 26 Jan 2008 13:52:44 GMT]]></title><description><![CDATA[<p>Danke, werde mal googeln gehn <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/1443991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443991</guid><dc:creator><![CDATA[o*amp*oler]]></dc:creator><pubDate>Sat, 26 Jan 2008 13:52:44 GMT</pubDate></item></channel></rss>