:-1: error: Use qmake LIB_DIR=/path/to/QGLViewer/libQGLViewer2.a

425 views Asked by At

I have a problem with QGLviewer (same problem, both on linux and windows).

In order to install QGLviewer i've followed theese steps http://www.libqglviewer.com/installWindows.html.

Then I've tried to compile their example project and it failed. What i got is:

Issues:

:-1: error: Use qmake LIB_DIR=/path/to/QGLViewer/libQGLViewerd2.a

Compile output:

22:03:04: Running steps for project animation...
22:03:04: Starting: "C:\Qt\Qt5.4.1\5.4\mingw491_32\bin\qmake.exe" C:\Users\Bartek\Desktop\libQGLViewer-2.6.1\examples\animation\animation.pro -r -spec win32-g++
Project MESSAGE: Unable to find libQGLViewer2.a in C:\Windows\System32
Project ERROR: Use qmake LIB_DIR=/path/to/QGLViewer/libQGLViewer2.a
22:03:04: The process "C:\Qt\Qt5.4.1\5.4\mingw491_32\bin\qmake.exe" exited with code 3.
Error while building/deploying project animation (kit: Desktop Qt 5.4.1 MinGW 32bit)
When executing step "qmake"
22:03:04: Elapsed time: 00:00.

Even though i copied generated QGLViewer2.dll and QGLViewer2.a to C:\Windows\System32

Do you have any idea what should i do to make this work?

I'm using QT Creator 3.3.1, QT 5.4.1

Windows 7 x64

Thank you for any piece of advice!

1

There are 1 answers

0
Bartek On

Solution:

You have to add the following line to your *.pro file

LIB_DIR = C:\Qt\Libs

This is the path to the place where you keep your libQGLviewer files (so libQGLviewer2.dll, libQGLviewer2.a, libQGLviewerd2.a)

Hope it helps.