跳到主要内容

Compilation with MinGW_64 (Optionnal)

To use a variant toolchain as MinGW_64, you first have to chose Cygwin GCC and then change the configuration of the used compilation toolchain. It has to be done only one time for the project to compile.

Steps:

  • Right click on the C++ code project in the Project Explorer tab (to generate your project in code, have a look on this page), and select Properties
  • In the tree, go to C/C++ Build > Settings
  • Change the command of Cygwin C+++ Compiler: change g++ by x86_64-w64-mingw32-g++
mingw settings: compiler

  • If you will use Tracing with MinGw change the command of Cygwin C Compiler: change gcc by x86_64-w64-mingw32-gcc
mingw c compiler for trace

  • Change the command of Cygwin C++ Linker: change g++ by x86_64-w64-mingw32-g++
mingw settings: linker

  • In Cygwin C++ Linker > Libraries, change the libraries settings
    • Replace boost_system by boost_system-mt (unless you are compiling code with Hub4Sys)
    • Replace libCWS_default by libCWS_minGW_x86_64
    • Remove rt
    • Add ws2_32
    • Add wsock32
mingw settings: libraries

警告

The order in which the libraries are organized can change the ouput of the compilation. If it doesn't work, try to rearrange the libraries as in the picture above, using the small icons representing up and down arrows.

  • In Cygwin C++ Linker > Miscellaneous, add linker flag -static
mingw settings: linker static