Skip to content
Snippets Groups Projects
Select Git revision
  • ed0f6784d96c589e2b842330525a92a35553db4e
  • main default protected
  • leveleditor
  • david-author
  • clang-tidy-cleanup
  • architecture-refactoring
  • cleanUpMenus
  • doxygen-cleanup
  • project-structure-refactoring
  • interpolation
  • buildingFeatures
  • win_end_screen
  • helpMenu
  • leveleditor-placement
  • text-rendering
  • updated_unit_contextmenu
  • level-from-commandline
  • unit_contextmenu
  • player
  • engine-scaling
  • clang-tidy
21 results

cpp-project

user avatar
David Hermann authored
- Creating `Box2dHelper.hpp` with inline converting helper functions of Box2D coordinates, tiles and pixels
- Outsourcing  `PIXELS_PER_METER` into `Box2dHelper.hpp`
- Setting `PIXELS_PER_METER` from 32 to 16 (tile length = 1 meter)
ed0f6784
History

Advanced Wars

Build-Anleitung

Linux/MacOS

  1. Repository klonen:

    git clone https://github.com/username/project.git
    cd project
  2. Build-Verzeichnis erstellen:

    mkdir build && cd build
  3. CMake konfigurieren und Build ausführen:

    cmake ..
    cmake --build .

Windows

  1. Repository klonen:

    git clone https://github.com/username/project.git
    cd project
  2. Build-Verzeichnis erstellen:

    mkdir build
    cd build
  3. CMake konfigurieren und Build ausführen:

    cmake ..
    cmake --build . --config Release

Visual Studio

  1. Repository klonen
  2. Visual Studio öffnen
  3. "Ordner öffnen" wählen und zum Projektverzeichnis navigieren
  4. Visual Studio erkennt automatisch das CMake-Projekt
  5. Build über "Build All" ausführen

Falls Syntax errors

  1. Erstelle .vscode/c_cpp_properties.json Datei
  2. Füge die folgende JSON so oder so ähnlich ein:
{
    "configurations": [
        {
            "name": "Fedora",
            "includePath": [
                "/usr/include",
                "/usr/include/SDL2"
            ],
            "defines": [],
            "intelliSenseMode": "linux-gcc-x64",
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c17",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

Build-Optionen

CMake kann mit verschiedenen Optionen konfiguriert werden:

cmake .. -DCMAKE_BUILD_TYPE=Release    # Release-Build
cmake .. -DCMAKE_BUILD_TYPE=Debug      # Debug-Build