<?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[Error linking with MFC library _tWinMain]]></title><description><![CDATA[<p dir="auto">I've just deleted the:</p>
<pre><code>int WINAPI _tWinMain(HINSTANCE hInstance,  // handle to current instance
   HINSTANCE hPrevInstance,  // handle to previous instance
   LPTSTR lpCmdLine,      // pointer to command line
   int nCmdShow          // show state of window
   );
</code></pre>
<p dir="auto">from my source code and relinked the application so I pick up the _tWinMain in appmodul.cpp (MFC library code).</p>
<p dir="auto">My problem is that I now get:</p>
<pre><code>1&gt;qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol main
1&gt;C:\Users\amonra\Documents\GitHub\DSS\x64\Debug\DeepSkyStacker.exe : fatal error LNK1120: 1 unresolved externals
</code></pre>
<p dir="auto">What is the solution?</p>
]]></description><link>https://forum.qt.io/topic/139402/error-linking-with-mfc-library-_twinmain</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 08:05:11 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139402.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Sep 2022 12:29:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Error linking with MFC library _tWinMain on Mon, 19 Sep 2022 08:20:34 GMT]]></title><description><![CDATA[<p dir="auto">It was in the MFC library code that I linked specifically in appmodul.cpp (see MFC source).   I since reinstated a main in my own code, which bypassed the problem.</p>
]]></description><link>https://forum.qt.io/post/729248</link><guid isPermaLink="true">https://forum.qt.io/post/729248</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Mon, 19 Sep 2022 08:20:34 GMT</pubDate></item><item><title><![CDATA[Reply to Error linking with MFC library _tWinMain on Mon, 19 Sep 2022 05:11:20 GMT]]></title><description><![CDATA[<p dir="auto">Where is main() in your code?</p>
]]></description><link>https://forum.qt.io/post/729234</link><guid isPermaLink="true">https://forum.qt.io/post/729234</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Mon, 19 Sep 2022 05:11:20 GMT</pubDate></item></channel></rss>