Skip to content
Permalink
e572cca6b4
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
20 lines (14 sloc) 1.4 KB

Although an important skill, compiling everything manually is obviously very inconvenient. There are multiple steps that must be remembered and performed in the correct order.

Especially as we start to create larger and larger projects, the number of files can easily become unmanageable. For example, the OpenCV computer vision library, the most widely used vision library contains almost 800 header (.h) files and more than 3000 source (.c and .cpp) files. Manually compiling it is obviously going to be a problem.

For that reason, everything except the smallest of C++ projects normally makes use of build systems and so called "make files". Build systems are tools that run a serious of instructions (in the make file) to compile and build all the different parts of a C++ project.

Build systems can be used with multiple languages but we are concerns specifically with C++ on 4003CEM.

One of the more widely used build systems is CMake. It has a number of advantages including being cross platform so that it is available on all operating systems.

Compiling with cmake

Compile the **main.cpp** file into an executable using the supplied cmake project file. The project file has been set up and already contains all the commands needed to produce and executable called **main**. This should be all the information you need to compile the executable.

{Check It!|assessment}(test-356226860)