如何将项目从 Visual C++ 6.0 转换为 Visual Studio Express 2010? [英] How can I convert a Project from Visual C++ 6.0 to Visual Studio Express 2010?

查看:56
本文介绍了如何将项目从 Visual C++ 6.0 转换为 Visual Studio Express 2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在编译 Microsoft Visual C++ 6.0 工作区附带的 Integrating Vision Toolkit 时遇到问题.Visual Studio Express 2010 无法转换工作区.

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.

我按照描述尝试了 VCUpgrade 此处 没有成功.

I tried VCUpgrade as described here without success.

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

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

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

 <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.

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

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

我希望有比将文件复制到平面目录更好的方法.(我好多年没用C++了,请初学者解释一下)

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)

推荐答案

需要在IDE中设置include目录.右键单击您的项目并选择属性.导航到 C/C++ -> General -> Additional Include Directories 并将路径添加到包含文件夹(包含 Helpers 文件夹和 helpers.h 文件的文件夹).像这样:

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:

$(SolutionDir)your_project\include

这篇关于如何将项目从 Visual C++ 6.0 转换为 Visual Studio Express 2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆