[Solved] Linking issues under MYS2/MinGW

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

[Solved] Linking issues under MYS2/MinGW

Post by Naugrim »

Hi,

I am trying to build OpenMW with MYS2/MinGW64 and I got to a point where I get a tone of linking errors. But they don't provide any info of what may be the cause, but I suspect is QT.

Here are the steps I followed:

Code: Select all

. installed Ming64 toolchain (with pacman)

. installed SDL2 (with pacman)

. added Git to path

. installed Qt4
 $ pacman -S qt-opensource-windows-x86-mingw482-4.8.6-1.exe

. add qmake to the path. According to CMAKE documentation, that's what cmake needs to locate the .h and libs.

. installed ffmpeg

 $ pacman -S mingw-w64-x86_64-ffmpeg

. install openSceneGraph 

 $ pacman -S mingw-w64-x86_64-OpenSceneGraph

. download MyGUI sources from GitHub release section

. build & install

 $ cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64 -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_BUILD_TYPE=Release -DMYGUI_RENDERSYSTEM=1 -DMYGUI_BUILD_DEMOS=OFF -DMYGUI_BUILD_TOOLS=OFF -DMYGUI_BUILD_PLUGINS=OFF ..
 $ mingw32-make install

. install bullet (2.86)
 $ pacman -S mingw-w64-x86_64-bullet
Now, when I run `mingw32-make` everything goes as expected until it tries to link the launcher, that's when I get a loooooot of errors starting with these:

Code: Select all

[ 52%] Linking CXX executable ..\..\openmw-launcher.exe
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0x36): undefined reference to `__imp__ZN10QBoxLayout12insertWidgetEiP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0x4d): undefined reference to `__imp__ZN7QString16fromAscii_helperEPKci'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0x61): undefined reference to `__imp__ZN7QWidget10setToolTipERK7QString'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0xdc): undefined reference to `__imp__ZNK9QComboBox5countEv'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0xed): undefined reference to `__imp__ZN5QIconC1Ev'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0x109): undefined reference to `__imp__ZN9QComboBox10insertItemEiRK5QIconRK7QStringRK8QVariant'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0x112): undefined reference to `__imp__ZN5QIconD1Ev'
CMakeFiles\openmw-launcher.dir/objects.a(datafilespage.cpp.obj):datafilespage.cpp:(.text+0x12f): undefined reference to `__imp__ZN8QVariantD1Ev'
Any idea? or way to diagnose it? The only thing I can see is that `datafilespage.cpp` uses QT components :/

Any help will be greatly appreciated.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: [Solved] Linking issues under MYS2/MinGW

Post by Naugrim »

Got it to compile using the QT package `mingw-w64-x86_64-qt4`
Post Reply