I've got just the same problem as
Marselleza did: I try to build OXC commit 3d092c227fbd4d4ef0a7a58ff31dcca399b693ef on
Windows 7 x64
MinGW 9.2.0 (x86)
CMake 3.17.2Using instructions at
https://www.ufopaedia.org/index.php/Compiling_with_MinGW_(OpenXcom) I downloaded
SDL_gfx-2.0.26
SDL_image-1.2.12
SDL_mixer-1.2.12
SDL-1.2.15
yaml-cpp-0.6.3and successfully compiled
SDL_gfx.dll &
libyaml-cpp.a not using boost.
But running cmake produces the same error as
Marselleza's one:
d:\Constantine\Code\OpenXcom\OpenXcom-master>cmake -G "MinGW Makefiles" .
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: D:/Constantine/Programs/MinGW/bin/gcc.exe
-- Check for working C compiler: D:/Constantine/Programs/MinGW/bin/gcc.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: D:/Constantine/Programs/MinGW/bin/g++.exe
-- Check for working CXX compiler: D:/Constantine/Programs/MinGW/bin/g++.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at cmake/modules/FindSDL2.cmake:187 (file):
file failed to open for reading (No such file or directory):
D:/Constantine/Code/OpenXcom/OpenXcom-master/SDL_INCLUDE_DIR-NOTFOUND/SDL_version.h
Call Stack (most recent call first):
cmake/modules/FindSDL2.cmake:278 (find_sdl_version)
CMakeLists.txt:64 (find_package)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Error at CMakeLists.txt:69 (message):
Can't find SDL which is required
I tried
Yankes makefile. It didn't worked out also. I think it is irrelevant here: it is intended for OXCE (not for OXC) and there are even no links to SDL_mixer, SDL_image etc.
Ok, I took makefile from the guide, set up my libs versions, removed AppDep call, because
'make depends' worked fine. But
'make all' compiled a lot of sources and then failed:
D:/Constantine/Programs/MinGW/bin/g++ -DWINVER=0x0400 -I..\SDL-1.2.15\include\SD
L -I..\SDL_mixer-1.2.12 -I..\SDL_image-1.2.12 -I..\SDL_gfx-2.0.26 -I..\yaml-cpp-
0.6.3\include -Wall -Wextra -Wno-unused-function -O2 -o src/Engine/CrossPlatform
.o -c src/Engine/CrossPlatform.cpp src/Engine/CrossPlatform.cpp:44:10: fatal err
or: dbghelp.h: No such file or directory
44 | #include <dbghelp.h>
| ^~~~~~~~~~~
compilation terminated.
Makefile:41: recipe for target 'src/Engine/CrossPlatform.o' failed
make: *** [src/Engine/CrossPlatform.o] Error 1
I cannot find that header in OXC, dependencies or MinGW directories. It can be found in MinGW-x64.
Ok, let's go to
src/Engine/CrossPlatform.cpp:
43 #ifndef __NO_DBGHELP
44 #include <dbghelp.h>
45 #endif
I added
-D__NO_DBGHELP to
CXXFLAGS and get new error on the same file:
d:\Constantine\Code\OpenXcom\OpenXcom-master>make all
D:/Constantine/Programs/MinGW/bin/g++ -DWINVER=0x0400 -I..\SDL-1.2.15\include\SD
L -I..\SDL_mixer-1.2.12 -I..\SDL_image-1.2.12 -I..\SDL_gfx-2.0.26 -I..\yaml-cpp-
0.6.3\include -Wall -Wextra -Wno-unused-function -O2 -D__NO_DBGHELP -o src/Engin
e/Sound.o -c src/Engine/Sound.cpp
D:/Constantine/Programs/MinGW/bin/g++ -DWINVER=0x0400 -I..\SDL-1.2.15\include\SD
L -I..\SDL_mixer-1.2.12 -I..\SDL_image-1.2.12 -I..\SDL_gfx-2.0.26 -I..\yaml-cpp-
0.6.3\include -Wall -Wextra -Wno-unused-function -O2 -D__NO_DBGHELP -o src/Engin
e/CrossPlatform.o -c src/Engine/CrossPlatform.cpp
src/Engine/CrossPlatform.cpp: In function 'std::string OpenXcom::CrossPlatform::
now()':
src/Engine/CrossPlatform.cpp:1095:21: error: 'LOCALE_INVARIANT' was not declared
in this scope; did you mean 'LANG_INVARIANT'?
1095 | if (GetDateFormatA(LOCALE_INVARIANT, 0, 0, "dd'-'MM'-'yyyy", date, MAX_
LEN) == 0)
| ^~~~~~~~~~~~~~~~
| LANG_INVARIANT
src/Engine/CrossPlatform.cpp:1097:21: error: 'LOCALE_INVARIANT' was not declared
in this scope; did you mean 'LANG_INVARIANT'?
1097 | if (GetTimeFormatA(LOCALE_INVARIANT, TIME_FORCE24HOURFORMAT, 0, "HH'-'m
m'-'ss", time, MAX_LEN) == 0)
| ^~~~~~~~~~~~~~~~
| LANG_INVARIANT
Makefile:41: recipe for target 'src/Engine/CrossPlatform.o' failed
make: *** [src/Engine/CrossPlatform.o] Error 1
LOCALE_INVARIANT can be found in
winnt.h again in MinGW-x64.
winnt.h in MinGW doesn't have
LOCALE_INVARIANT macro.
How do you guys compile OpenXcom under x86? ))
P. S. I would highly appreciate if smb updated mentioned compiling manual. Its very old:
'Copy original game directories in <project>\OpenXcom-master\bin\data directory'. OG is supposed to be copied into TFTD and UFO directories for a long time.