简体   繁体   English

我真的需要Visual Studio吗

[英]Do I really need Visual Studio

Do I really need Visual studio to build c/C++ application on Windows. 我真的需要Visual Studio在Windows上构建c / C ++应用程序吗? Is there any way to have makefiles and get the application built. 有没有什么方法可以使makefile并构建应用程序。

You can use any compiler that'll target Windows (for example, MinGW , Digital Mars , Comeau or others). 您可以使用任何以Windows为目标的编译器(例如MinGWDigital MarsComeau或其他)。 All of them can be driven by the command line so you can use your preferred make utility (or other build utility). 所有这些都可以由命令行驱动,因此您可以使用首选的make实用程序(或其他build实用程序)。

That said, Visual Studio is pretty nice (even the free version ). 也就是说,Visual Studio非常不错(甚至是免费版本 )。 And don't forget that it installs the command line compiler tools, so you can drive it from a makefile as well (unfortunately, it won't spit out a makefile for you anymore, but it has it's own command line tools to drive a build based on project settings if you want to jump from IDE to command line builds). 并且不要忘记它安装了命令行编译器工具,因此您也可以从makefile驱动它(不幸的是,它不会再为您吐出makefile,但是它拥有自己的命令行工具来驱动如果要从IDE跳转到命令行,请根据项目设置进行构建)。

If you want to stick to the Microsoft toolchain but don't want the IDE, you can use cl and link to build from the command line in conjuction with either the MSBUILD system or NMAKE . 如果要坚持使用Microsoft工具链但不希望使用IDE,则可以使用cl和link与MSBUILD系统或NMAKE结合使用,从命令行进行构建。

If you don't have the compiler it is available free with VC++ Express . 如果您没有编译器,则可通过VC ++ Express免费获得。

To install the Microsoft compiler without installing an IDE download the Windows SDK which is available for free. 要安装Microsoft编译器而不安装IDE,请下载Windows SDK,它是免费的。

http://en.wikipedia.org/wiki/Windows_SDK http://en.wikipedia.org/wiki/Windows_SDK

Qt is very nice, and downloading and installing the SDK gets you the QtCreator which provides a consistent IDE across platforms, with very nice builtin help, build system, access to revision control, debugging, ... and it even includes the MinGW compiler and toolchain for you. Qt非常好,下载并安装SDK 会给QtCreator ,它提供跨平台的一致IDE,并具有非常好的内置帮助,构建系统,对版本控制的访问,调试...,甚至包括MinGW编译器和为您的工具链。

MinGW is something simpler: the usual GNU toolchain but setup such that it provides native Windows binary. MinGW更简单:通常的GNU工具链,但设置为提供本机Windows二进制文件。

Last but not least, there is Cygwin which gives you the most Unixy flavour. 最后但并非最不重要的一点是, Cygwin为您提供了最Unixy的风味。

No, you don't. 不,你没有。

I know you said c, but you can also check out MonoDevelop, should you choose to do more than just that: http://monodevelop.com/Download 我知道您说过c,但是您还可以选择MonoDevelop,如果您选择做的还不止于此: http : //monodevelop.com/Download

No you do not. 你不可以。 There are many free IDE's out there, or you can do everything from the command line with a non-microsoft compiler. 有很多免费的IDE,或者您可以使用非Microsoft编译器从命令行执行所有操作。

www.bloodshed.net offers a pretty good IDE that uses the Mingw compiler. www.bloodshed.net提供了一个使用Mingw编译器的非常不错的IDE。

You can even do without extra tools as long as you have the compilers on your machine. 只要您的计算机上装有编译器,您甚至可以不使用任何额外的工具。 Take a look here for an explainatin: 看看这里的解释:

http://msdn.microsoft.com/en-us/library/ms235639.aspx http://msdn.microsoft.com/en-us/library/ms235639.aspx

Not at all. 一点也不。 It is quite possible to do Win32 programing, including OS and GUI programming, with gcc from Mingw . 可以使用Mingw的 gcc进行Win32编程,包括OS和GUI编程。

For all my hobby work, if I can I use the gcc compiler from Mingw (for C or Ada), with Emacs as my IDE and gnumake for my build system. 对于我所有的业余爱好,如果可以的话,我可以使用Mingw的gcc编译器(用于C或Ada),将Emacs作为我的IDE,并将gnumake用于我的构建系统。 There are good Mingw ports for all the major revision control systems too, including Git. 所有主要版本控制系统(包括Git)也都具有良好的Mingw端口。

That's the toolset I used to create the SETI@Home Service , which was a wrapper for the SETI@Home client that installed and ran it as a Windows service, did failure detection and auto restarts, and had a built in web server for monitoring. 这就是我用来创建SETI @ Home服务的工具集,该工具集是SETI @ Home客户端的包装程序,该客户端安装并作为Windows服务运行,进行故障检测和自动重启,并具有用于监视的内置Web服务器。 All that with no VisualStudio. 所有这些都没有VisualStudio。

You can use Eclipse with C/C++ Development Toolkit and with Mingw Compilers. 您可以将Eclipse与C / C ++开发工具包和Mingw编译器一起使用。 the only problem is that you will not have M$ Stuff like MFC, but you can use QT or wxWindows 唯一的问题是您将不会像MFC那样拥有M $ Stuff,但是可以使用QT或wxWindows

Two solutions that immediately come to mind: 立即想到两个解决方案:

Using makefiles does not prevent you from using the Microsoft C++ compiler, which is nice if you want to use the VS debugger. 使用makefiles不会阻止您使用Microsoft C ++编译器,如果您想使用VS调试器,这很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM