Windows Cross Compile

For code related discussions and questions

Windows Cross Compile

Postby kAeeRf » 11 May 2014, 07:04

I was sucessfully compiled the master branch according to the linux compile guide and got the game to run on linux.

Now I'm trying to do the same for MS Windows and been following the windows cross-compile guide. A few barriers that I encountered were that nsis needed to be installed for mxe (i.e. run "make nsis" in the mingw-cross-env/ directory - missing in step 3 of the guide). The other one was the PKG_CONFIG_PATH_i686_pc_mingw32 configuration described by Stu's forum post. Without that the configure script couldn't find QT. Oh and the fonts to copy where in the /usr/share/fonts/dejavu/ but that's probably just because I run fedora. The first two would be good to document in the guide.

Anyway, the make fails at:
Code: Select all
../lib/ivis_opengl/libivis_opengl.a(png_util.o): In function `Z17iV_saveImage_JPEGPKcPK8iV_Image':
/home/git/warzone2100/lib/ivis_opengl/png_util.cpp:328: undefined reference to `jpeg_encode_image(unsigned char*, unsigned char*, unsigned int, unsigned int, unsigned int, unsigned int)'
collect2: error: ld returned 1 exit status
make[3]: *** [warzone2100.exe] Fehler 1
make[3]: Leaving directory `/home/git/warzone2100/src'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/git/warzone2100/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/git/warzone2100'
make: *** [all] Fehler 2

Obviously it's not a coding error since it compiled for linux. So I assume that I'm missing something in my build process. Any help is welcome.
New user
Posts: 1
Joined: 11 May 2014, 05:37

Re: Windows Cross Compile

Postby stiv » 12 May 2014, 04:45

Undefined reference usually means a missing library.

looking at the source, jpeg_encode_image is in ./lib/ivis_opengl/jpeg_encoder.cpp
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Return to Coding