<?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[QT-Fehler bei Verwendung von QObject]]></title><description><![CDATA[<p>Hallo, ich hab ein Problem. Ich verwende QT mit Visual C++.<br />
Dort hab ich ein Programm geschrieben, dass auch funktioniert, nur wenn ich innerhalb meiner (einzigen) verwendeten Klasse Q_OBJECT schreibe, macht er mir ein paar Link-Fehler:</p>
<p>Test.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;protected: virtual void __thiscall Test::initMetaObject(void)&quot; (?initMetaObject@Test@@MAEXXZ)<br />
Test.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;public: virtual char const * __thiscall Test::className(void)const &quot; (?className@Test@@UBEPBDXZ)<br />
Test.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;public: static class QMetaObject * __cdecl Test::staticMetaObject(void)&quot; (?staticMetaObject@Test@@SAPAVQMetaObject@@XZ)#</p>
<p>Die Klasse heißt Test, und erbt von QWidget. Wie gesagt, ohne Q_OBJECT gehts...<br />
Vielen Dank</p>
<p>ArturW</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/52150/qt-fehler-bei-verwendung-von-qobject</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 18:57:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/52150.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Oct 2003 18:52:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QT-Fehler bei Verwendung von QObject on Thu, 16 Oct 2003 18:52:34 GMT]]></title><description><![CDATA[<p>Hallo, ich hab ein Problem. Ich verwende QT mit Visual C++.<br />
Dort hab ich ein Programm geschrieben, dass auch funktioniert, nur wenn ich innerhalb meiner (einzigen) verwendeten Klasse Q_OBJECT schreibe, macht er mir ein paar Link-Fehler:</p>
<p>Test.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;protected: virtual void __thiscall Test::initMetaObject(void)&quot; (?initMetaObject@Test@@MAEXXZ)<br />
Test.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;public: virtual char const * __thiscall Test::className(void)const &quot; (?className@Test@@UBEPBDXZ)<br />
Test.obj : error LNK2001: Nichtaufgeloestes externes Symbol &quot;public: static class QMetaObject * __cdecl Test::staticMetaObject(void)&quot; (?staticMetaObject@Test@@SAPAVQMetaObject@@XZ)#</p>
<p>Die Klasse heißt Test, und erbt von QWidget. Wie gesagt, ohne Q_OBJECT gehts...<br />
Vielen Dank</p>
<p>ArturW</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373961</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373961</guid><dc:creator><![CDATA[arturw]]></dc:creator><pubDate>Thu, 16 Oct 2003 18:52:34 GMT</pubDate></item><item><title><![CDATA[Reply to QT-Fehler bei Verwendung von QObject on Thu, 16 Oct 2003 18:53:32 GMT]]></title><description><![CDATA[<p>Hast du die Library dazugelinkt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373963</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373963</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Thu, 16 Oct 2003 18:53:32 GMT</pubDate></item><item><title><![CDATA[Reply to QT-Fehler bei Verwendung von QObject on Thu, 16 Oct 2003 18:55:54 GMT]]></title><description><![CDATA[<p>Macht Visual Studio ja automatisch. Wenn ich die Beispielprogramme kompiliere gehts auch. Nur bei meinem selbstgeschriebenen nicht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373965</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373965</guid><dc:creator><![CDATA[arturw]]></dc:creator><pubDate>Thu, 16 Oct 2003 18:55:54 GMT</pubDate></item><item><title><![CDATA[Reply to QT-Fehler bei Verwendung von QObject on Thu, 16 Oct 2003 18:57:08 GMT]]></title><description><![CDATA[<p>Wieso sollte das VisualStudio die Library von irgend einem Drittanbieter automatisch dazulinken? Das ist Humbug!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373968</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Thu, 16 Oct 2003 18:57:08 GMT</pubDate></item><item><title><![CDATA[Reply to QT-Fehler bei Verwendung von QObject on Thu, 16 Oct 2003 19:02:50 GMT]]></title><description><![CDATA[<p>Einfach so natürlich nicht. Aber wenn man Qt installiert und nachher auch das Plugin für Visual Studio installiert, sind die Einstellungen alle drin. Ich geb mal die Zeile fürs linken an:</p>
<p>kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib wsock32.lib winmm.lib<br />
$(QTDIR)\lib\qt-mt230nc.lib $(QTDIR\lib\qtmain.lib<br />
/incremental:yes /pdb:&quot;Debug/tutorial.pdb&quot; /machine:IX86 /nodefaultlib:&quot;libc&quot; /out:&quot;Debug/tutorial.exe&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373972</guid><dc:creator><![CDATA[arturw]]></dc:creator><pubDate>Thu, 16 Oct 2003 19:02:50 GMT</pubDate></item><item><title><![CDATA[Reply to QT-Fehler bei Verwendung von QObject on Thu, 16 Oct 2003 19:07:02 GMT]]></title><description><![CDATA[<p>genehmigt <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="😉"
    /><br />
Dann weiss ichs leider auch nicht. Sorry.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/373976</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/373976</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Thu, 16 Oct 2003 19:07:02 GMT</pubDate></item></channel></rss>