Hello,
I want to port an MFC Application from Visual Studio 6 MFC application to
Visual C++ 2005 express edition beta.
While building i get following error:
------ Build started: Project: OSTDLL, Configuration: Debug Win32 ------
Compiling...
StdAfx.cpp
c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\StdAf x.h(41) : fatal error
C1083: Cannot open include file: 'afxcmn.h': No such file or directory
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.40607
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\Debug\ini2.sbr': No such file or
directory
Build log was saved at "file://c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \BuildLog.htm"
OSTDLL - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
the build log is:
Build Log Build started: Project: OSTDLL, Configuration: Debug|Win32
Command Lines Creating temporary file "c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \RSP00000419441540.rsp"
with contents
[
/Od /I "../cppunit-1.10.2/include/" /I "../include/OPENCVB4/" /I
"../include/OPENCVcxcoreb4/" /I "../include/highguib4/" /D "_USRDLL" /D
"_AFXDLL" /D "_AFXEXT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D
"OST_DLL_EXPORTS" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /GR
/Yc"stdafx.h" /Fp".\Debug/OSTDLL.pch" /Fo".\Debug/" /Fd".\Debug/"
/FR".\Debug/" /W3 /c /ZI /TP
".\StdAfx.cpp"
]
Creating command line "cl.exe @"c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \RSP00000419441540.rsp"
/nologo"
Creating temporary file "c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \RSP00000519441540.rsp"
with contents
[
/Od /I "../cppunit-1.10.2/include/" /I "../include/OPENCVB4/" /I
"../include/OPENCVcxcoreb4/" /I "../include/highguib4/" /D "_USRDLL" /D
"_AFXDLL" /D "_AFXEXT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D
"OST_DLL_EXPORTS" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /GR
/Yu"stdafx.h" /Fp".\Debug/OSTDLL.pch" /Fo".\Debug/" /Fd".\Debug/"
/FR".\Debug/" /W3 /c /ZI /TP
".\SmartEdit.cpp"
".\Sliders.cpp"
".\OSTSquareFeatureProcessor.cpp"
".\OSTSearchWindow.cpp"
".\OSTRoundFeatureProcessor.cpp"
".\OSTRectifySystemProcessor.cpp"
".\OSTProcessor.cpp"
".\OSTPositionFoursaProcssor.cpp"
".\OSTPositionBouguetProcssor.cpp"
".\OSTOutputFilterProcessor.cpp"
".\OSTmainCFG.cpp"
".\OSTKalmanFilterProcessor.cpp"
".\OSTIndexTransformer.cpp"
".\OSTGUIDlgPositionProcessor.cpp"
".\OSTGUIDlgEpipolGeoProcessor.cpp"
".\OSTFoursaCameraModel.cpp"
".\OSTFeatureProcessorCFG.cpp"
".\OSTFeatureProcessor.cpp"
".\OSTFeatureModel.cpp"
".\OSTEpipolGeoProcessor.cpp"
".\OSTCFG.cpp"
".\OSTCameraModel.cpp"
".\OSTBoundingBox.cpp"
".\OSTBouguetCameraModel.cpp"
".\OST.cpp"
".\Log.cpp"
".\ini2.cpp"
]
Creating command line "cl.exe @"c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \RSP00000519441540.rsp"
/nologo"
Creating temporary file "c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \RSP00000619441540.rsp"
with contents
[
/o ".\Debug/OSTDLL.bsc"
".\Debug\ini2.sbr"
".\Debug\Log.sbr"
".\Debug\OST.sbr"
".\Debug\OSTBouguetCameraModel.sbr"
".\Debug\OSTBoundingBox.sbr"
".\Debug\OSTCameraModel.sbr"
".\Debug\OSTCFG.sbr"
".\Debug\OSTEpipolGeoProcessor.sbr"
".\Debug\OSTFeatureModel.sbr"
".\Debug\OSTFeatureProcessor.sbr"
".\Debug\OSTFeatureProcessorCFG.sbr"
".\Debug\OSTFoursaCameraModel.sbr"
".\Debug\OSTGUIDlgEpipolGeoProcessor.sbr"
".\Debug\OSTGUIDlgPositionProcessor.sbr"
".\Debug\OSTIndexTransformer.sbr"
".\Debug\OSTKalmanFilterProcessor.sbr"
".\Debug\OSTmainCFG.sbr"
".\Debug\OSTOutputFilterProcessor.sbr"
".\Debug\OSTPositionBouguetProcssor.sbr"
".\Debug\OSTPositionFoursaProcssor.sbr"
".\Debug\OSTProcessor.sbr"
".\Debug\OSTRectifySystemProcessor.sbr"
".\Debug\OSTRoundFeatureProcessor.sbr"
".\Debug\OSTSearchWindow.sbr"
".\Debug\OSTSquareFeatureProcessor.sbr"
".\Debug\Sliders.sbr"
".\Debug\SmartEdit.sbr"
".\Debug\StdAfx.sbr"
]
Creating command line "bscmake.exe @"c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \RSP00000619441540.rsp"
/nologo"
Output Window Compiling...
StdAfx.cpp
c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\StdAf x.h(41) : fatal error
C1083: Cannot open include file: 'afxcmn.h': No such file or directory
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.40607
Copyright (C) Microsoft Corporation. All rights reserved.
BSCMAKE: error BK1506 : cannot open file '.\Debug\ini2.sbr': No such file or
directory
Results Build log was saved at "file://c:\programme\Microsoft Visual
Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\Debug \BuildLog.htm"
OSTDLL - 2 error(s), 0 warning(s)
I have already read following article:
PRB: Porting MFC Projects to Visual C++ .NET Changes Target Operating System
http://support.microsoft.com/default...en-us%3B320479
Article ID : 320479
which adresses the problem of porting an MFC application
According to this i chamged my StdAfx.h (inserted "#define _WIN32_WINNT
0x0400" in StdAfx.h)
Here is how my StdAfx.h :
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__9AE25BA0_6F53_4A34_B6F0_E60 305EDD709__INCLUDED_)
#define AFX_STDAFX_H__9AE25BA0_6F53_4A34_B6F0_E60305EDD709 __INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
//this is important for the porting to dotnet
#define _WIN32_WINNT 0x0400
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately
before the previous line.
#endif //
!defined(AFX_STDAFX_H__9AE25BA0_6F53_4A34_B6F0_E60 305EDD709__INCLUDED_)
Where is the bug? What can i do?
Any help is appreciated!
--
best regards,
gerd