如何将从Linux中的命令行编译的C程序导出到IDE?

时间:2023-01-24 13:15:09

There are a lot of open source C/C++ projects, most of them can be compiled using "make" in Linux. Is there any easy way to export this to an IDE, for example Microsoft Visual C++, CodeBlock, or Eclipse? Even if it is an involved work, is there any step by step help for doing that?

有很多开放源码的C/ c++项目,其中大部分可以使用Linux中的make编译。有什么简单的方法可以将它导出到IDE中,例如Microsoft Visual c++、CodeBlock或Eclipse?即使这是一项涉及到的工作,是否有任何一步一步的帮助?

Thanks for the help.

谢谢你的帮助。

TJ

TJ

1 个解决方案

#1


1  

Considering that most (if not all) of the IDEs support importing a makefile or cmake based project, that should be a no-brainer.

考虑到大多数ide(如果不是全部的话)都支持导入基于makefile或cmake的项目,这应该是显而易见的。

Be careful about configure scripts though, as they generally do important stuff not supported automatically by an IDE. In fact, build systems like cmake, premake and scons were invented because there was no standard way for an IDE to know what a script is doing. (That, while sacrificing flexibility, makes the system standard.)

但是要注意配置脚本,因为它们通常会做IDE不自动支持的重要工作。事实上,像cmake、premake和scons这样的构建系统是被发明的,因为没有标准的方法让IDE知道脚本在做什么。(在牺牲灵活性的同时,也提高了系统的标准。)

#1


1  

Considering that most (if not all) of the IDEs support importing a makefile or cmake based project, that should be a no-brainer.

考虑到大多数ide(如果不是全部的话)都支持导入基于makefile或cmake的项目,这应该是显而易见的。

Be careful about configure scripts though, as they generally do important stuff not supported automatically by an IDE. In fact, build systems like cmake, premake and scons were invented because there was no standard way for an IDE to know what a script is doing. (That, while sacrificing flexibility, makes the system standard.)

但是要注意配置脚本,因为它们通常会做IDE不自动支持的重要工作。事实上,像cmake、premake和scons这样的构建系统是被发明的,因为没有标准的方法让IDE知道脚本在做什么。(在牺牲灵活性的同时,也提高了系统的标准。)