Makefiles,从 VC6 迁移到 Visual Studio 2010
我正在尝试将一些项目从 VC6 迁移到 Visual Studio 2010,但我遇到了 makefile 问题 - 目前它们不起作用! (这是预料之中的)。
现在应该如何编写它们的任何想法或指针(在它是以 msdev 开头的行之前...现在找不到,是否有相当于 use 的最新版本?我读过有关 vcbuild 的内容,但我相信这不存在于VS10)。
是否可以在一行中构建整个项目?
即当前要构建的行是:
msdev project.dsp /MAKE "$(component) - Win32 Release" /build
有什么想法这会改变成什么吗?
I'm trying to migrate some projects from VC6 to Visual Studio 2010 but I'm running into issues with makefiles - at the moment they don't work! (Which was expected).
Any ideas or pointers how they should be written now (before it was a line beginning with msdev... which cannot be found now, is there an up to date equivalent to use? I read about vcbuild but I believe this is not present in VS10).
Is it possible to just build a whole project in one line?
i.e. the current line to build is:
msdev project.dsp /MAKE "$(component) - Win32 Release" /build
Any ideas what this would change to?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
VS2010不再使用DSP风格的项目。自 VC6 以来,项目文件格式发生了根本性的变化。现在的扩展名是
vcproj
,而不是dsp
。最好的办法是在新的 IDE 中打开项目,将其迁移为 VS2010 格式,并确保它可以在其中正常构建和运行。请注意,某些可用的 VC6 代码无法在 VC10 中编译,因为较新的编译器具有强一致性,而旧的编译器则不然。然后,尝试使用生成的
project.vcproj
文件进行命令行构建。我不确定VS2010是否能识别并导入VC6项目。如果没有,那么您可以使用 从现有项目创建项目代码,从您的源代码创建 VS2010 风格的项目。这比仅仅打开旧的 DSP 文件更困难,但仍然比将所有 DSP 设置手动迁移到有效的 VS2010 vcproj 更容易> 文件。如果您使用的是 VS2010 Express,那么即使这个选项也不可用,因为该选项仅在付费版本中提供。
VS2010 no longer uses DSP style projects. The project file format has changed radically since VC6. The extension now is
vcproj
, notdsp
.Your best bet is to migrate the project to VS2010 format by opening it in the new IDE, and make sure it builds and runs OK there. Note that some working VC6 code will not compile in VC10 since the newer compiler is strongly conformant, while the old was not. Then, try the command line build using the resulting
project.vcproj
file.I'm not sure if VS2010 will recognize and import VC6 projects. If not, then you can use Create Project from Existing Code to create a VS2010-style project from your source. This is going to be harder than just opening the old
DSP
file, but still easier than manual migration of all theDSP
settings into a valid VS2010vcproj
file. If you are on VS2010 Express, then even this is out since that option is only in paid versions.VS2010 应用程序名称是 devenv。在命令行中,只要运行了正确的
vcvars32.bat
文件,只需键入devenv /?
即可获取命令行构建帮助。本质上,它是:devenv解决方案文件.sln /构建“发布”
因此,一旦升级项目并创建解决方案,就应该没问题了。可能有一种方法可以在没有解决方案文件的情况下构建项目,但我不知道该怎么做。
The VS2010 app name is
devenv
. From the command line, as long as you've run the rightvcvars32.bat
file, just typedevenv /?
to get the command line build help. Essentially, it's:devenv solutionfile.sln /Build "Release"
So once you upgrade your projects and create a solution, you should be ok. There may be a way to build a project without a solution file, but I don't know how to do that.