<?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[Blöde Frage zu Objekten]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe eine ziemlich blöde Frage. Ich habe das Problem wenn ich in der Hauptdatei z.B. relais.cpp ein Objekt erstelle es in der Dialog Datei relaisDlg.cpp nicht sichtbar ist. Wo muß ich das Objekt erstellen, dass es in beiden Dateien sichbar ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/147735/blöde-frage-zu-objekten</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 10:10:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/147735.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 May 2006 12:26:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Blöde Frage zu Objekten on Fri, 19 May 2006 12:26:21 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe eine ziemlich blöde Frage. Ich habe das Problem wenn ich in der Hauptdatei z.B. relais.cpp ein Objekt erstelle es in der Dialog Datei relaisDlg.cpp nicht sichtbar ist. Wo muß ich das Objekt erstellen, dass es in beiden Dateien sichbar ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060926</guid><dc:creator><![CDATA[Bruschnik]]></dc:creator><pubDate>Fri, 19 May 2006 12:26:21 GMT</pubDate></item><item><title><![CDATA[Reply to Blöde Frage zu Objekten on Fri, 19 May 2006 12:28:03 GMT]]></title><description><![CDATA[<p>du schreibst ein &quot;extern CRelais object;&quot; in eine Headerdatei, die von beiden .CPP's eingebunden wird (am sinnvollsten ist die &quot;relais.h&quot;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060927</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 19 May 2006 12:28:03 GMT</pubDate></item><item><title><![CDATA[Reply to Blöde Frage zu Objekten on Fri, 19 May 2006 12:35:21 GMT]]></title><description><![CDATA[<p>Danke für die schnelle Antwort, ich habe extern CSerial serial; in die Relais.h geschrieben und beim kompilieren und linken kommt dann folgende Fehlermeldung:</p>
<p>Relais_neuDlg.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;class CSerial serial&quot; (?serial@@3VCSerial@@A)<br />
Debug/Relais_neu.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise<br />
Fehler beim Ausführen von link.exe.</p>
<p>Eingefügt habe ich das ganze hier:</p>
<p>#if _MSC_VER &gt; 1000<br />
#pragma once<br />
#endif // _MSC_VER &gt; 1000</p>
<p>#ifndef __AFXWIN_H__<br />
#error include 'stdafx.h' before including this file for PCH<br />
#endif</p>
<p>#include &quot;resource.h&quot; // Hauptsymbole<br />
#include &quot;Serial.h&quot;</p>
<p>/////////////////////////////////////////////////////////////////////////////<br />
// CRelais_neuApp:<br />
// Siehe Relais_neu.cpp für die Implementierung dieser Klasse<br />
//</p>
<p>extern CSerial serial;</p>
<p>class CRelais_neuApp : public CWinApp<br />
{<br />
public:<br />
CRelais_neuApp();</p>
<p>// Überladungen<br />
// Vom Klassenassistenten generierte Überladungen virtueller Funktionen<br />
//{{AFX_VIRTUAL(CRelais_neuApp)<br />
public:<br />
virtual BOOL InitInstance();</p>
<p>//}}AFX_VIRTUAL</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060934</guid><dc:creator><![CDATA[Bruschnik]]></dc:creator><pubDate>Fri, 19 May 2006 12:35:21 GMT</pubDate></item><item><title><![CDATA[Reply to Blöde Frage zu Objekten on Fri, 19 May 2006 12:40:00 GMT]]></title><description><![CDATA[<p>extern deklariert auch nur den Namen, ohne Speicher zu reservieren - zusätzlich benötigst du noch in <strong>genau einer</strong> Übersetzungseinheit (.CPP Datei) eine dazu passende Definition &quot;CSerial serial;&quot;, die den nötigen Speicher für die Variable definiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1060940</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060940</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 19 May 2006 12:40:00 GMT</pubDate></item><item><title><![CDATA[Reply to Blöde Frage zu Objekten on Fri, 19 May 2006 12:45:25 GMT]]></title><description><![CDATA[<p>Ok, vielen Dank. Jetzt geht es <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/1060946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1060946</guid><dc:creator><![CDATA[Bruschnik]]></dc:creator><pubDate>Fri, 19 May 2006 12:45:25 GMT</pubDate></item></channel></rss>