diff options
author | George Marques <george@gmarqu.es> | 2016-05-03 16:29:32 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2016-05-03 16:35:36 -0300 |
commit | 9424c6c58f0b33f06807936958978e907574a845 (patch) | |
tree | 1fa02b1f67a0a62a235d53053e054ae16b71c851 | |
parent | 5b039245b9d95c8ca1914d41d976e9a52e5510ef (diff) |
Fix windows 64-bits build.
The change in `tools/doc/doc_data.cpp` is needed because the MSVC
compiler does not support variable length arrays.
Fix #4113
-rw-r--r-- | drivers/gl_context/glew.h | 3 | ||||
-rw-r--r-- | platform/windows/detect.py | 2 | ||||
-rw-r--r-- | tools/doc/doc_data.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gl_context/glew.h b/drivers/gl_context/glew.h index 4eed47708f..7b66ea97ed 100644 --- a/drivers/gl_context/glew.h +++ b/drivers/gl_context/glew.h @@ -153,8 +153,7 @@ typedef unsigned short wchar_t; #endif #if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_) # ifdef _WIN64 -//typedef __int64 ptrdiff_t; -typedef long int ptrdiff_t; +typedef __int64 ptrdiff_t; # else typedef _W64 int ptrdiff_t; # endif diff --git a/platform/windows/detect.py b/platform/windows/detect.py index d01a5a114d..56e8a5d45d 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -289,6 +289,8 @@ def configure(env): print "Compiled program architecture will be a 32 bit executable. (forcing bits=32)." else: print "Failed to detect MSVC compiler architecture version... Defaulting to 32bit executable settings (forcing bits=32). Compilation attempt will continue, but SCons can not detect for what architecture this build is compiled for. You should check your settings/compilation setup." + if env["bits"]=="64": + env.Append(CCFLAGS=['/D_WIN64']) else: # Workaround for MinGW. See: diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index 4232a6480d..dc2150e6cc 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -64,7 +64,7 @@ void DocData::merge_from(const DocData& p_data) { // since polymorphic functions are allowed we need to check the type of // the arguments so we make sure they are different. int arg_count = cf.methods[j].arguments.size(); - bool arg_used[arg_count]; + bool* arg_used = new bool[arg_count]; for (int l = 0; l < arg_count; ++l) arg_used[l] = false; // also there is no guarantee that argument ordering will match, so we // have to check one by one so we make sure we have an exact match |