User forums > Help
Trouble Importing & compiling vc7 project
rossa:
Ok heres the full compile log.
-------------- Build: Debug|Win32 in Simple ---------------
cl.exe /nologo /MDd /Gm /Wp64 /W3 /Zi /D_DEBUG /DWIN32 /D_WINDOWS /D_DEBUG /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include" /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include" /I"C:\Program Files\Microsoft Platform SDK\Include" /c Simple.cpp /FoDebug\Simple.obj
Simple.cpp
Simple.cpp(58) : warning C4996: 'CWinApp::Enable3dControlsStatic' was declared deprecated
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(4371) : see declaration of 'CWinApp::Enable3dControlsStatic'
rc.exe /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include" /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include" /I"C:\Program Files\Microsoft Platform SDK\Include" -foDebug\Simple.res Simple.rc
cl.exe /nologo /MDd /Gm /Wp64 /W3 /Zi /D_DEBUG /DWIN32 /D_WINDOWS /D_DEBUG /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include" /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include" /I"C:\Program Files\Microsoft Platform SDK\Include" /c stdafx.cpp /FoDebug\stdafx.obj
stdafx.cpp
cl.exe /nologo /MDd /Gm /Wp64 /W3 /Zi /D_DEBUG /DWIN32 /D_WINDOWS /D_DEBUG /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include" /I"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include" /I"C:\Program Files\Microsoft Platform SDK\Include" /c MainFrm.cpp /FoDebug\MainFrm.obj
MainFrm.cpp
link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\lib" /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin" /out:Simple.exe Debug\Simple.obj Debug\stdafx.obj Debug\MainFrm.obj Debug\Simple.res /DEBUG /debug
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(apphelp.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "void __stdcall AfxFormatStrings(class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > &,unsigned int,char const * const *,int)" (?AfxFormatStrings@@YGXAAV?$CStringT@DV?$StrTraitMFC@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@IPBQBDH@Z)
nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "public: void __thiscall CEditView::ReadFromArchive(class CArchive &,unsigned int)" (?ReadFromArchive@CEditView@@QAEXAAVCArchive@@I@Z)
Simple.exe : fatal error LNK1120: 3 unresolved externals
Process terminated with status 1120 (0 minutes, 3 seconds)
6 errors, 1 warnings
R.
MortenMacFly:
--- Quote from: rossa on September 05, 2006, 08:57:48 am ---link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\lib" /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin" /out:Simple.exe Debug\Simple.obj Debug\stdafx.obj Debug\MainFrm.obj Debug\Simple.res /DEBUG /debug
--- End quote ---
As I said: You don't link against any SDK lib. I wonder how this should work. Now unfortunately I don't know your program but you could try adding Advapi32.lib as a first step. Also please read this: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VisualC_PLUS_PLUS_DOT_NET/Q_21018785.html
(Scroll very down to see the answers.)
With regards, Morten.
Ps.: It's really hard to resolve linker issues without knowledge of the project/libs you are using. Please notice that this is *not* a C::B issue, you should better check the dependencies yourself and/or ask in a forum related to the libs you are using.
rossa:
OK I think I've resolved the problem by adding _AFXDLL and _MBCS as additional defines
Now my problem is debugging. If I add a break point nothing happens. All I get is
Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug|Win32
Adding source dir: D:\mds_cliq\research\Simple\
Adding source dir: D:\mds_cliq\research\Simple\
Adding file: Simple.exe
Starting debugger: done
Setting breakpoints
Debugger finished with status 1
What does this mean? I'm using gdb.exe. But to do so I had to copy the exe to the bin directory of VC7. Is this the wrong thing to do? If I didnt C::B kept complaining that there was no debugger.
rossa:
Ok I found the "Additional Directories" for the debugger. But I still dont seem to be able to set break points and have it stop.
Sorry for the trivial questions but I new to C::B
R.
mandrav:
Go to debugger's options and enable the debugger's *debug* log. Then start a debugging session and, when it ends, copy-paste the contents of that log here.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version