如何将一个项目从Visual c++ 6.0转换为Visual Studio Express 2010?

时间:2022-09-01 18:28:45

I have issues compiling Integrating Vision Toolkit which comes with a Microsoft Visual C++ 6.0 workspace. Visual Studio Express 2010 fails to convert the workspace.

我在编译集成视觉工具包时遇到了一些问题,它附带一个Microsoft Visual c++ 6.0的工作空间。Visual Studio Express 2010未能转换工作空间。

I tried VCUpgrade as described here without success.

我尝试了VCUpgrade,但没有成功。

Unable to convert project.
Please make sure this is a valid Visual C++ 6.0 project.

I tried to start over with a fresh project and add the files manually, the vcxproj contains the files like:

我尝试重新开始一个新的项目,手工添加文件,vcxproj包含如下文件:

 <ItemGroup>
    <ClInclude Include="..\..\..\src\Helpers\BasicFileIO.h" />
    <ClInclude Include="..\..\..\src\Helpers\Configuration.h" />
    <ClInclude Include="..\..\..\src\Helpers\helpers.h" />
    ...
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\..\..\src\Helpers\BasicFileIO.cpp" />
    <ClCompile Include="..\..\..\src\Helpers\Configuration.cpp" />
    <ClCompile Include="..\..\..\src\Helpers\helpers.cpp" />
    ...

These files do not compile since the (already contained) header files cannot be resolved.

这些文件不会编译,因为(已经包含的)头文件无法解析。

How should I setup the project to include cpp and h files from different directories?

如何设置项目以包含来自不同目录的cpp和h文件?

I hope that there is a better way than copying the files into a flat directory. (I didn't use C++ for many years, so please explain it for a beginner)

我希望有一种比将文件复制到平面目录更好的方法。(我很多年没有使用c++了,所以请给初学者讲一下)

2 个解决方案

#1


3  

You need to set the include directory in the IDE. Right click your project and select Properties. Navigate to C/C++ -> General -> Additional Include Directories and add the path to your include folder (the folder that contains the Helpers folder with your helpers.h file in it). Something like this:

您需要设置IDE中的include目录。右键单击项目并选择Properties。导航到C/ c++ ->通用->附加包括目录,并将路径添加到您的Include文件夹(包含helper文件夹的文件夹)。h文件中)。是这样的:

$(SolutionDir)your_project\include

#2


5  

You need VC++ 2008 Express (or retail version of VC++ 2010, like Professional edition) to convert from VC++ 6.0. Take a look at this thread: Visual C++ 2010 Express cannot open Visual C++ 6.0 projects

您需要vc++ 2008 Express(或零售版本的vc++ 2010,如专业版)从vc++ 6.0转换。看看这个线程:Visual c++ 2010 Express不能打开Visual c++ 6.0项目。

#1


3  

You need to set the include directory in the IDE. Right click your project and select Properties. Navigate to C/C++ -> General -> Additional Include Directories and add the path to your include folder (the folder that contains the Helpers folder with your helpers.h file in it). Something like this:

您需要设置IDE中的include目录。右键单击项目并选择Properties。导航到C/ c++ ->通用->附加包括目录,并将路径添加到您的Include文件夹(包含helper文件夹的文件夹)。h文件中)。是这样的:

$(SolutionDir)your_project\include

#2


5  

You need VC++ 2008 Express (or retail version of VC++ 2010, like Professional edition) to convert from VC++ 6.0. Take a look at this thread: Visual C++ 2010 Express cannot open Visual C++ 6.0 projects

您需要vc++ 2008 Express(或零售版本的vc++ 2010,如专业版)从vc++ 6.0转换。看看这个线程:Visual c++ 2010 Express不能打开Visual c++ 6.0项目。