visual-studio 海湾合作委员会与 Visual Studio?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/216025/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 09:47:41  来源:igfitidea点击:

GCC with Visual Studio?

visual-studiovisual-studio-2008visual-c++gccmakefile

提问by TraumaPony

How hard would it be to use GCC instead of VC++ from within Visual Studio 2008? Obviously, some of the keywords won't match, and some may not get syntax highlighting (unless you made a new language service).

在 Visual Studio 2008 中使用 GCC 而不是 VC++ 会有多难?显然,有些关键字不会匹配,有些关键字可能无法突出显示语法(除非您制作了新的语言服务)。

Is this what a 'makefile project' is for, pretty much?

这几乎是“makefile 项目”的用途吗?

采纳答案by JesperE

There is no GCC plugin for Visual Studio as the one for example for Intel C++, which allows Intel's compiler to be used as a drop-in replacement for Visual C++.

没有用于 Visual Studio 的 GCC 插件,例如用于英特尔 C++ 的插件,它允许英特尔的编译器用作 Visual C++ 的直接替代品。

You can use Makefile projects which allows you to use any external tool you like (make, SCons, jam, whatever) to do your build. If you don't like Makefiles, you may want to look at CMakewhich allows you to generate Makefiles or Visual Studio projects from a much simpler description. This also means that you're not bound to Makefiles or Visual Studio projects, but can switch between them as you like.

您可以使用 Makefile 项目,它允许您使用您喜欢的任何外部工具(make、SCons、jam 等等)来进行构建。如果您不喜欢 Makefile,您可能需要查看CMake,它允许您从更简单的描述中生成 Makefile 或 Visual Studio 项目。这也意味着您不受 Makefile 或 Visual Studio 项目的约束,但可以根据需要在它们之间切换。

回答by Afriza N. Arief

See the thread "Use a gcc port to build programs with Visual Studio"in MSDN's forums for similar discussion.

有关类似讨论,请参阅MSDN 论坛中的主题“使用 gcc 端口使用 Visual Studio 构建程序”

You can use makefiles and also use WinGDBfor better integration(including debugging)

您可以使用 makefile 并使用WinGDB进行更好的集成(包括调试

回答by KindDragon

You can use Visual GDBadd-in for Visual Studio that simplify work with GCC

您可以使用VisualStudio 的Visual GDB插件来简化 GCC 的工作