简体   繁体   中英

How are open source projects in C/C++ carried out exactly without .sln/.project files?

Seems most open source projects in C/C++ only provide the source code,ie nginx

Is this a convention that anyone interested in joining the developing team should figure out the .sln/.project files himself to qualify??

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 a makefile to know how to build a project. on Windows, the main open source compiler is MinGW which is a win32 port of gcc . 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.

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:

  • source code and how to build it
  • various system checks that should be done (like find various 3rd part libraries)
  • How to build and run unit-tests
  • How to install application

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.

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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