0

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

sorush-r
  • 10,490
  • 17
  • 89
  • 173
  • header not found? why isn't it obvious that you don't have the header files? :) – paulm Feb 16 '14 at 14:56
  • @paulm Not so obvious... Why header is missing? I think Perl should copy API-level headers from `src` to `include/Qt3D` folder while configuring project but for some unknown reason it fails to do so. – sorush-r Feb 16 '14 at 14:58
  • I was being sarcastic, this question has a complete lack of detail. You haven't event said WHICH header is missing, let alone posted the failure/error from the build log, which arguments you passed etc. – paulm Feb 16 '14 at 15:05
  • Ah, that was a markup error. I just forgot to wrap `<`s in `'` – sorush-r Feb 16 '14 at 15:33

1 Answers1

3

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.

Sez
  • 1,275
  • 11
  • 26
  • I additionally had to copy the headers from QtQuick to a QtQuick3D folder and change some directorires in the examples to include Qt3D resp. QtQuick3D... – Bim Oct 31 '14 at 15:53