Check if SDL_main is in use The main() function of colobot-app is declared as extern "C" to prevent name mangling. This is required because on some platforms, SDL2 declares its own main() function and defines a macro that renames the user's main to SDL_main; in which case, name mangling may cause linking failures. However, when building for platforms where this is not the case, gcc15 complains that specifying linkage for main is not allowed. > error: cannot declare ‘::main’ with a linkage > specification [-Wpedantic] This commit wraps the extern block in #ifdefs that check if the main -> SDL_main macro is in use.
This is the main repository for the open-source Colobot: Gold Edition project developed by TerranovaTeam and community contributors, based on the original game by Epsitec.
This repository contains only the source code of the project. The game also requires data files which are provided as a git submodule and are hosted in a separate repository.
Features
Multiplatform - play the game on any modern OS.
New game modes - challenge yourself in Missions+ or challenge your friends in CodeBattles.
Mod support - download custom levels and assets from our ModDB page.