Compiling the project - lazychords/lazychords-lib GitHub Wiki

Julien will fill this up for Windows Nicolas will fill this up for Linux

#External Tools

You will need a c++11 compiler with make command, Cmake, and the boost framework.

##C++11 compiler

We are all using g++ on this project and we will give the installation process for g++, however, there should be no issues with other compilers (such as clang). If you do encounter issues, please tell us.

The goal of this part is to have a working c++11 compiler and a make command. If you already have those installed and you know how to use them on your system, you can skip this part.

###On Windows systems

If you do not have an IDE installed and which to install one, I highly suggest downloading and installing Codeblocks and select the download with mingw which is the compiler (gcc for windows).

First, test your compiler from the IDE and try to compile the following program in a file called hello.cpp

#include <iostream>
int main()
{
    static_assert(true, "Just checking c++11 is activated");
    std::cout<<"Hello World";
    return 0;
}

If it fails, please refer to Codeblocks documentation because you have had an installation issue. If not, proceeed to the next step.

Add the folder .../Codeblocks/Mingw/bin to your PATH environment variable.

Try out the make command ! To do so, create the a file into the folder of your hello world program and name it Makefile (with no extention). Then copy the following lines into it.

hello : hello.cpp
    g++ hello.cpp -std=c++11 -o hello

Now, open a command window (progam called cmd), got to the folder (with the cd command) in which your Makefile and hello.cpp are and type mingw32-make. Then type ./hello.exe. If it shows "Hello World", your are all set to continue !

Possible problems :

  • mingw32-make is not a known command -> did you forget to add the bin folder to your PATH ?
  • Can not find Makefile/hello.cpp -> Did you cd to the directory in which both the Makefile and hello.cpp are ?
  • Problem with c++11 -> check your g++ is version 4.8 or higher
  • Other problems : please google your problem and then you can contact us

###On Linux systems

###On Mac systems

##CMake

CMakefiles are like Makefiles but are simpler to write for complex projects. However, they require the use of CMake that will convert your CMakefile to a Makefile on your system.

###How to install and use CMake on Windows

The simplest way to use Cmake on windows is to use the GUI interface, to do so :

  1. Download Cmake here and chose the correct download for your system.
  2. Install Cmake, this should be fairly straightforward
  3. Check that CMake works on your system
Need simple cmake example.
⚠️ **GitHub.com Fallback** ⚠️