C/C 中的开源项目如何?完全没有 .sln/.project 文件执行?
看来大多数C/C++开源项目只提供源代码,即 nginx
这是一个任何有兴趣加入开发团队的人都应该自己找出 .sln/.project
文件才能获得资格?
Seems most open source projects in C/C++ only provide the source code,i.e. nginx
Is this a convention that anyone interested in joining the developing team should figure out the .sln/.project
files himself to qualify??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
大多数开源项目都来自计算的 Linux 端。因此,他们主要使用 UNIX 风格的构建工具以及开源编译器。
主要构建工具是
make
,它使用makefile
来了解如何构建项目。在 Windows 上,主要的开源编译器是MinGW
,它是gcc
的 win32 端口。使用这些工具可以最大限度地保留 UNIX 和 Windows 之间的共同点。请注意,.sln 文件特定于 Microsoft 编译器,这些编译器不是免费使用的(并且相当昂贵),它们不可移植,因此不适合多平台编程。
most open source projects are coming from the linux side of computing. thus, they are mainly using unix style build tools, as well as open source compilers.
the main build tool is
make
, which uses amakefile
to know how to build a project. on Windows, the main open source compiler isMinGW
which is a win32 port ofgcc
. the use of those tools allows to keep a maximum of common things between unix and windows.note that .sln files are specific to microsoft compilers which are not free to use (and are rather costly), they are not portable and so are not suitable for multi-platform programming.
有些项目使用 CMake,它可以为您最喜欢的构建系统生成项目文件,但如上所述,您不需要不需要使用 .sln 和 pro 文件,即使项目是使用 MSVC 编译器、MinGW + makefiles、或 scons、或 CMake 或任何其他数量的脚本方法来调用正确的命令来编译程序也可以工作很好。
不要将 IDE 与编译器混淆!
Some projects use CMake, which can generate project files for Your Favourite Build System, but as mentioned above, you don't need to use .sln and pro files, even if a project is built with the MSVC compiler, MinGW + makefiles, or scons, or CMake, or any other number of scripty methods to invoke the right commands to compile the program will work just fine.
Don't confuse the IDE with the compiler!
不,大多数开源项目不使用 MSVC 解决方案,因为它们不可移植且功能很弱。
在大多数情况下,他们使用所谓的“构建系统”,例如 autotools、CMake 或 SCons。
这些构建系统包括以下信息:
它们还允许重要的任务,例如交叉编译和打包部署。
这些任务通过特定的构建系统脚本语言完成,为您提供了很大的灵活性。
因此,这些构建系统通常比典型的“项目文件”更强大,并且它们
通常与不同平台和操作系统上的多个编译器一起使用。
某些构建系统(如 CMake)允许作为生成 MSVC 解决方案的选项之一,以及构建应用程序的可选方法之一。
No, most opensource project do not use MSVC solutions as they not portable and very weak in terms of features.
In most cases they use what is called "build-system" like autotools, CMake or SCons.
These build systems include information about:
They also allow important tasks like cross compilation and packaging for deploy.
These task done via specific build system scripting language that allow you big flexibility.
So, these build systems generally much more powerful then typical "project files" and they
generally work with multiple compilers on different platforms and operating systems.
Some of build systems (like CMake) allow as one of the options to generate MSVC solutions as well as one of optional ways to build application.