User forums > Help
Trouble Importing & compiling vc7 project
rossa:
Hi All,
Just trying out C::B and am having prblems with a simple console app.
I get the following error after doing a rebuild. I have the include and lib directories set but I still get this error. Could it be a compiler flag problem? Compiles fine with VC2003 prof.
Simple.rc:10: fatal error RC1015: cannot open include file 'afxres.h'.
:: === Build finished: 1 errors, 1 warnings ===
stahta01:
This happens to me when I forgot to add the directories I have under Compilier that are also needed under resouce compiler.
If a.rc includes b.h then the directory containing b.h is normally needed in the list of resouce compiler directories.
Tim S
MortenMacFly:
In addition make sure you really have the include path's setup properly. Thus, not only to the system (platform SDK) but also to the MFC/ATL (AFX) stuff. As an example: For the VC6 compiler you'll need [VC6]\Include , [VC6]\MFC\Include and [VC6]\ATL\Include. for the compiler settings, the linker needs [VC6]\Lib and [VC6]\MFC\Lib (assuming you would like to develop a MFC based application here).
With regards, Morten.
rossa:
Hi Guys,
I checked everything again and now I'm getting link errors:
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
:: === Build finished: 6 errors, 0 warnings ===
I have this in Directories/Linker
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\lib
C:\Program Files\Microsoft Platform SDK\Lib
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin
I cant think why the libs cannot be linked? Is there some other option/setting I'm missing?
MortenMacFly:
Could you please post the full compiler log (see my sig how to enable this).
I would guess you are missing to link against very basic libraries (user32...).
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
Go to full version