commit f31fade1
Fixed a problem with cross compilingx
Changed files
| M | CMakeLists.txt before |
| M | source/code/main.cpp before |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c0c573..d0bed04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,7 @@ endif(MINGW)
if (WIN32)
SET(GUI_TYPE WIN32)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
endif()
if (NOT WIN32)
@@ -52,7 +53,6 @@ file(GLOB SOURCES "source/code/*.cpp" "source/code/*/*.cpp" "source/code/Libs/*.
#I am still trying to get BlockGame to compile as a source file
list(REMOVE_ITEM SOURCES "${blockattack_SOURCE_DIR}/source/code/BlockGame.cpp")
-
#Some messages to figure out what cmake does
message("${SOURCES}")
message("${CMAKE_EXE_LINKER_FLAGS}")
diff --git a/source/code/main.cpp b/source/code/main.cpp
index e1adc29..42c10d4 100644
--- a/source/code/main.cpp
+++ b/source/code/main.cpp
@@ -1787,7 +1787,8 @@ static void StartTwoPlayerVs() {
}
//The main function, quite big... too big
-int main(int argc, const char* argv[]) {
+//Warning: the arguments to main must be "int argc, char* argv[]" NO CONST! or SDL_main will fail to find it
+int main(int argc, char* argv[]) {
try {
OsCreateFolders();
//Init the file system abstraction layer