开发者

Makefiles, moving from VC6 to Visual Studio 2010

开发者 https://www.devze.com 2023-03-18 18:45 出处:网络
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).

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?


VS2010 no longer uses DSP style projects. The project file format has changed radically since VC6. The extension now is vcproj, not dsp.

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 the DSP settings into a valid VS2010 vcproj file. If you are on VS2010 Express, then even this is out since that option is only in paid versions.


The VS2010 app name is devenv. From the command line, as long as you've run the right vcvars32.bat file, just type devenv /? 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号