Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rgrr/playground

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Playground

This is Hardy’s personal playground. But everyone is free to contribute.

Playground

Games

Games should not be understood literally…​ instead these are finger exercises for the software developer.

The following exercises are targeted:

  1. setup Eclipse, cmake and clang/gcc

  2. GoogleTest [subdir]

    1. introduction with a simple example

    2. mocking

  3. gitlab-runner

  4. test driven development with a simple bag module

  5. Software Design Pattern

    1. Observer

    2. Singleton

    3. Builder

    4. more to come

Setup

C/C++

Eclipse

For C/C++ experiments, Eclipse is used as IDE. For installation details refer to Clue.

MSYS2

Toolchain etc is taken from MSYS2. Because my software is most of the time running on 32bit targets, MINGW32 packets are used for playing and testing (sizeof(void *)==4 on MINGW32, while 8 on MINGW64).

More information on MSYS2 installation can be found in Clue.

Tip
MSYS2 installation should go to the default location c:\msys64 to make everything work smoothly.
Installation
# tooling
pacman -S --needed make
pacman -S --needed mingw-w64-i686-cmake mingw-w64-i686-ninja

# gcc
pacman -S --needed mingw-w64-i686-gcc mingw-w64-i686-gdb

# clang
pacman -S --needed mingw-w64-i686-clang mingw-w64-i686-compiler-rt mingw-w64-i686-lldb mingw-w64-i686-clang-analyzer mingw-w64-i686-clang-tools-extra

Visual Studio Code

As an alternative VSC can be used. Not my real favorite, because every addition or change to it’s setup ends in >1h googling. But flexibility is great and there exists a load of extensions. The following is just a loose collection of topics concerning VSC.

.vscode/settings.json
Adding MINGW32 to the Terminal Setup
    "terminal.integrated.profiles.windows": {
        "MINGW32": {
            "path": "C:\\msys64\\usr\\bin\\bash.exe",
            "args": [
                "--login",
                "-i"
            ],
            "env": {
                "MSYSTEM": "MINGW32",
                "CHERE_INVOKING": "1"
            }
        },
    },
    "terminal.integrated.defaultProfile.windows": "MINGW32",