Question

I'm having troubles compiling Qt3D on Windows. The module compiles and links properly on my Linux machine with Qt 4.8.1. Though on Windows (Qt 5.2 personal build) g++ says <Qt3D/qt3dglobal.h> header is not found.

I've compiled qt3d on linux with following these steps:

  1. Download a tarball of branch qt4 from here, extract it.
  2. qmake CONFIG+=package
  3. make -j4
  4. sudo make install

And for Windows (Qt 5.2 gcc-4.8.1 personal build):

  1. Download tarball of master branch from here, extract it
  2. qmake
  3. make // => error: missing headers

What I'm missing?

Note: ActiveState Perl is in PATH

Was it helpful?

Solution

I was able to reproduce this error - I guess its a bug as Qt3D used to build like this. But the Qt folks are probably used to building Qt3D as part of the modular Qt build. My guess is that some part of the qmake step which is meant to set up the header paths is not working on Windows.

I got it to build by copying the headers manually:

# in git bash
mkdir Qt3D
find qt-qt3d/ -name "*.h" -exec cp \{} Qt3D/. \;
mkdir qt-qt3d/include
mv Qt3D qt-qt3d/include/.

Then:

# in VS2012 shell
set PATH=%PATH%;%HOMEPATH%\build\qt5\bin
mkdir qt3d_build
cd qt3d_build
qmake ..\qt-qt3d\qt3d.pro
nmake

Here Qt and qt-qt3d were in the current directory (in qt5 and qt-qt3d respectively) and Qt was built from source already.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top