Hello buddies,
As I try to see what I can do to modify OpenXCom, I'm trying to build it on my computer. I am using Mingw. (Please do not ask me to install what everybody seems to want me to install, because this EDI sucks).
I downloaded SDL for developers and built a small test program with SDL.
I downloaded SDL_mixer source and 32-bit DLL and built a small test program with SDL_mixer and SDL.
I downloaded SDL_image source and 32-bits DLL and built a small test program with SDL_image and SDL.
I downloaded SDL_gfx, tried to build it with the makefile for MinGW, had problems, found
this, built it and built a small test program with SDL_gfx and SDL.
I downloaded yaml-cpp (version 0.5.1) and cmake, tried to use cmake to generate makefile, realized boost was necessary, downloaded boost, tried to build boost, failed to build boost, realized yaml-cpp would perhaps only need boost header files, tried to generate makefile for dynamic build, had problems, found
this, decided to build a static library, generated makefile, built yaml-cpp, built a small test program with yaml-cpp. (I have headaches now)
Now, I'm trying to build OpenXCom itself, and of course, it doesn't work.
This is the makefile I have written:
PROG=OpenXCom
MINGW=i686-w64-mingw32-
SRC=$(wildcard src/*.cpp src/*/*.cpp src/*/*/*.cpp)
OBJ=$(SRC:.cpp=.o)
BIN=bin\$(PROG).exe
WINVER=0x0400
CC=$(MINGW)g++
CFLAGS=-DWINVER=$(WINVER) -I..\SDL-1.2.15\include\SDL -I..\SDL_mixer-1.2.12 -I..\SDL_image-1.2.12 -I..\SDL_gfx-2.0.24 -I..\yaml-cpp-0.5.1\include -I..\boost_1_54_0
LDFLAGS=-L..\SDL-1.2.15\lib -L..\yaml-cpp-0.5.1\build -lmingw32 -lSDLmain ..\SDL-1.2.15\bin\SDL.dll ..\SDL_mixer-1.2.12\bin\SDL_mixer.dll ..\SDL_image-1.2.12\bin\SDL_image.dll ..\SDL_gfx-2.0.24\bin\SDL_gfx.dll -lyaml-cpp
.PHONY:all compile depends mrproper clean rebuild
all:compile
compile:$(BIN)
depends:
AppDep -n -l "# Dependencies" makefile
for %%i in ($(SRC:.cpp=)) do $(CC) $(CFLAGS) -MM "%%i.cpp" -MT "%%i.o" >> makefile
$(BIN):$(OBJ)
$(CC) $(CFLAGS) -o $(BIN) $(OBJ) $(LDFLAGS)
%.o:%.cpp
$(CC) $(CFLAGS) -o $@ -c $<
mrproper:clean
for %%i in ($(BIN)) do if exist "%%~fi" del "%%~fi"
clean:
for %%i in ($(OBJ)) do if exist "%%~fi" del "%%~fi"
rebuild:mrproper all
Compilation just (seems to) works fine.
But at the very last step, linker fails and give the following errors:
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x240): undefined reference to `_imp__glGenTextures@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x26d): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x393): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x4c1): undefined reference to `_imp__glBindTexture@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x4ee): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x60a): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x63e): undefined reference to `_imp__glPixelStorei@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x66b): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x787): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x7f3): undefined reference to `_imp__glTexImage2D@36'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x820): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x93c): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xbd8): undefined reference to `_imp__glClearColor@16'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xbe9): undefined reference to `_imp__glClear@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xbf3): undefined reference to `_imp__glFlush@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xc4b): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xe8b): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xfb1): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0xfeb): undefined reference to `_imp__glTexParameteri@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1016): undefined reference to `_imp__glTexParameteri@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1048): undefined reference to `_imp__glTexParameteri@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1084): undefined reference to `_imp__glTexParameteri@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x10b1): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x11cd): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x11f7): undefined reference to `_imp__glMatrixMode@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x120b): undefined reference to `_imp__glLoadIdentity@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1269): undefined reference to `_imp__glOrtho@48'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1290): undefined reference to `_imp__glViewport@16'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x12a1): undefined reference to `_imp__glMatrixMode@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x12ab): undefined reference to `_imp__glLoadIdentity@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x12cb): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x13e7): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x145f): undefined reference to `_imp__glPixelStorei@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x148c): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x15a8): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x161c): undefined reference to `_imp__glTexSubImage2D@36'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x16bb): undefined reference to `_imp__glBegin@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x16d6): undefined reference to `_imp__glTexCoord2f@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x16f6): undefined reference to `_imp__glVertex3i@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x171b): undefined reference to `_imp__glTexCoord2f@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x173a): undefined reference to `_imp__glVertex3i@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x175f): undefined reference to `_imp__glTexCoord2f@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1780): undefined reference to `_imp__glVertex3i@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x17b1): undefined reference to `_imp__glTexCoord2f@8'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x17d1): undefined reference to `_imp__glVertex3i@12'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x17db): undefined reference to `_imp__glEnd@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x17fb): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1917): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x193a): undefined reference to `_imp__glFlush@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1964): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x1a80): undefined reference to `_imp__glGetError@0'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x245a): undefined reference to `_imp__glDisable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x246b): undefined reference to `_imp__glDisable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x247c): undefined reference to `_imp__glDisable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x248d): undefined reference to `_imp__glDisable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x249e): undefined reference to `_imp__glDisable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x24af): undefined reference to `_imp__glEnable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x24c0): undefined reference to `_imp__glEnable@4'
src/Engine/OpenGL.o:OpenGL.cpp:(.text+0x275a): undefined reference to `_imp__glDeleteTextures@8'
d:/prog/i686-w64-mingw32-gcc-4.5.4-release-win32_rubenvb/bin/../lib/gcc/i686-w64-mingw32/4.5.4/../../../../i686-w64-mingw32/bin/ld.exe: src/Engine/OpenGL.o: bad reloc address 0xbc in section `.rdata'
collect2: ld returned 1 exit status
makefile:25: recipe for target `bin\OpenXCom.exe' failed
gmake: *** [bin\OpenXCom.exe] Error 1
What am I doing wrong? (except refusing to install you-know-what).
Please, tell me I'm just missing something easy to repair...
Do I miss an openGL library?