Question

I have cloned git://gitorious.org/qt/qt3d.git and am referencing it from one of my Qt projects (without wanting to have to compile Qt from scratch). The library compiles fine, and I point the linker to Qt53D.lib (with the correct "d" suffix for debug) for my project, using:

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../qt3d/lib -lQt53D
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../qt3d/lib -lQt53Dd
else:unix: LIBS += -L$$OUT_PWD/../../qt3d/src/threed/ -lQt53Dd

The paths here are correct. Upon compilation of the project the linker gives the error:

Cannot open file [correct path]\Qt53Dd530.lib

For some reason "530" is being appended to the .lib filename. My guess is that something is up in the qmake config files, because the qt3d/lib/cmake/Qt53D/Qt53DConfigVersion.cmake file when generated contains the line

set(PACKAGE_VERSION 5.3.0)

I am attempting to compile using Qt 5.1.1. Is there a fix for using this version, or do I need to update to 5.3? If so, where can I get it? (It's not on the standard download page.) Will I be required to compile this version of the framework myself?

Was it helpful?

Solution

As I wrote in the comment, you are having a complex approach for a simple issue. You should use the following statement in your qmake project file:

QT += 3d

This will make things work automatically if you have the Qt3D library properly installed.

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