Also for reference, our original build system uses Cygwin and makefiles. Below I will paste the command line invoked to compile 1 source file in this MFC project as well as the link command.<div><br></div><div>Also please note that when building through our original build system, which also uses VS2003, it successfully builds. For some reason it isn&#39;t trying to find mfc40.lib. I don&#39;t understand command line builds using MSVC so I&#39;m hoping someone with more experience can maybe find a missing piece to the puzzle here.<br>
<div><br></div><div>There is a file called &quot;uploadlogDlg.cpp&quot; and this is the command used to build it:</div><div><br></div><div><pre style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; font-size: 11px; background-color: rgb(255, 255, 255); ">
&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET/Vc7">1.NET/Vc7</a>&quot;/bin/cl.exe      -nologo -MDd -EHsc -GT  -Zm800 -YX -FpWINNT5.0_DBG.OBJ/vc7.pch -D_MBCS -D_AFXDLL -D_WINDOWS -D_WINDLL -D_AFXDLL -D_USRDLL -D_HAVE_STL_ -D_WINDOWS -D_WIN32_WINNT=0x0400 -DUNSAFE_CONFIGOPS_ALLOWED   -DPRODUCT_TESS -DUSE_GTINET=true -DDEBUG -D_HAVE_STL_ -D_REENTRANT -D_STLP_DEBUG -DBUILD_VERSION=\&quot;6.3.2.111019021006\&quot; -D_X86_ -DWINNT -DWIN32 -D_WIN32_WINNT=0x0500 -DWINVER=0x500 -DWIN32_IMPORT_EXPORT -DSTL=std  -I. -IWINNT5.0_DBG.OBJ -I../../../work/B1/WINNT5.0_DBG.OBJ/bin    -I../../../work/B1/WINNT5.0_DBG.OBJ/include  -I../../../work/B1/WINNT5.0_DBG.OBJ/include/nspr -I../../../work/B1/WINNT5.0_DBG.OBJ/include/stlport -I../../../work/B1/WINNT5.0_DBG.OBJ/include/gtinet -X -I&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET/Vc7">1.NET/Vc7</a>&quot;/include  -I&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET">1.NET</a>&quot;/VC7/PlatformSDK/include -I../../../work/B1/WINNT5.0_DBG.OBJ/include/mssdkutils -I&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET/Vc7">1.NET/Vc7</a>&quot;/atlmfc/include -I&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET/Vc7">1.NET/Vc7</a>&quot;/atlmfc/include   -Zi -D_DEBUG -Od -W3 -FdWINNT5.0_DBG.OBJ/vc7.pdb /RTC1 -we4103 -GR -GF -D_USE_32BIT_TIME_T     -c \
        \
        /FoWINNT5.0_DBG.OBJ/uploadlogDlg.obj \
        \
        uploadlogDlg.cpp</pre><div><br></div><div><br></div><div>Also here is the linker command from what I can see:</div><div><br></div><div><pre style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; font-size: 11px; background-color: rgb(255, 255, 255); ">
&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET/Vc7">1.NET/Vc7</a>&quot;/bin/cl.exe \
        \
        /FeWINNT5.0_DBG.OBJ/uploadlog.exe \
        \
        WINNT5.0_DBG.OBJ/StdAfx.obj WINNT5.0_DBG.OBJ/uploader.obj WINNT5.0_DBG.OBJ/uploadlog.obj WINNT5.0_DBG.OBJ/uploadlogDlg.obj WINNT5.0_DBG.OBJ/mlog.obj  WINNT5.0_DBG.OBJ/uploadlog_exe.res -FmWINNT5.0_DBG.OBJ/uploadlog.map /link /DEBUG /DEBUGTYPE:CV /FIXED:NO /SUBSYSTEM:WINDOWS      -nologo /LIBPATH:WINNT5.0_DBG.OBJ /LIBPATH:../common/WINNT5.0_DBG.OBJ /LIBPATH:../../../work/B1/WINNT5.0_DBG.OBJ/lib /LIBPATH:&quot;C:/PROGRA~1/MICROS~<a href="http://1.NET/Vc7">1.NET/Vc7</a>&quot;/atlmfc/lib /LIBPATH:../../../work/B1/WINNT5.0_DBG.OBJ/lib -debug -debugtype:cv    \
         advapi32.lib gdconfig.lib gdlog.lib gdlogviewer.lib gdnet.lib gdutil.lib gdgsoap.lib gmmwsclient.lib ole32.lib Ws2_32.lib gdzlib.lib -pdb:WINNT5.0_DBG.OBJ/uploadlog.pdb libnspr4.lib libplc4.lib libplds4.lib 
c:/cygwin/bin/cp.exe -fup WINNT5.0_DBG.OBJ/uploadlog.exe WINNT5.0_DBG.OBJ/uploadlog.pdb WINNT5.0_DBG.OBJ/uploadlog.map WINNT5.0_DBG.OBJ/uploadlog.pdb WINNT5.0_DBG.OBJ/uploadlog.map ../../../work/B1/WINNT5.0_DBG.OBJ/bin</pre>
</div><div><br></div><div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Thu, Oct 20, 2011 at 2:04 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I grepped everything possible, I found nothing related to mfc4. This is getting scary...<div><br></div><div>Since I&#39;m not a CMake developer or expert, can someone guide me with steps on how to debug this issue? If I need to debug CMake itself from source, that is acceptable but hopefully we don&#39;t need to start there.</div>

<div><br></div><div>Once I open the generated VS2008 solution, is there anything in project settings I can look at to maybe see something suspicious? Just let me know what I need to do and I&quot;ll post the information you need.</div>

<div><br></div><div>Thanks in advance...<br clear="all"><div><br></div><div>---------</div>Robert Dailey<div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Thu, Oct 20, 2011 at 12:01 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I did this and it links just fine... hmmm. Let me grep my source tree for &quot;mfc4&quot; and see what I get. I really am running out of ideas, I don&#39;t know what else to look for.<br clear="all"><div><br></div><div>
---------</div>

Robert Dailey<div><div></div><div><br>
<br><br><div class="gmail_quote">On Thu, Oct 20, 2011 at 11:46 AM, Bill Hoffman <span dir="ltr">&lt;<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>On 10/20/2011 12:35 PM, Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I just tried with VS2008 and I get the same:<br>
     fatal error LNK1104: cannot open file &#39;mfc40.lib&#39;<br>
<br>
Also I created a default MFC application using the new project wizard in<br>
VS2008 and it compiled &amp; linked just fine, so it seems like maybe this<br>
is a CMake issue?<br>
<br>
</blockquote>
<br></div>
Can you take the default MFC app that you created, and write CMake files for it?  Then see if that works?</blockquote></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>