How to build Qmake for Visual studio project? specifically for QGLViewer for octomap library

1.2k views Asked by At

I need to build an octomap on visual studio 2017. According to website they have asked to do the following

open a windows shell (e.g., from the START-Menu -> QT)
    cd octovis/src/extern/QGLViewer
    qmake -t vclib QGLViewer.pro -spec win32-msvc2010    (ignore any warnings)

So I did the same but in windows command prompt terminal and when I feed the above commands it throws the following error:

#qmake -t vclib QGLViewer.pro -spec win32-msvc2010 

Could not find qmake spec 'win32-msvc2010'.
Error processing project file: QGLViewer.pro 

 #qmake -t vclib QGLViewer.pro -spec win32-msvc2017 

Could not find qmake spec 'win32-msvc2017'.
Error processing project file: QGLViewer.pro 

What should I do in order to configure and generate a QGLViewer.vcxproj?

Additional details:

  1. Project location : "C:\software\octomap-1.9.0\octomap-1.9.0\octovis\src\extern\QGLViewer"
  2. qmake location : C:\vcpkg\packages\qt5-base_x64-windows\tools\qt5
  3. Visual studio : 2017 ( Version 15.9.8)

Any help in regards to this would be much appreciated as I have a very limited understanding on qmake.

1

There are 1 answers

0
Stuart Golodetz On

You can build QGLViewer with Qt Creator instead, and then it just works - I was bashing my head against the same issue as you for a while, but then just tried that and it solved my problems. For what it's worth, I used Qt Creator 4.12.4 and did a build all.

I had a few other issues building Octovis on Windows that you might run up against as well. See here for the changes I had to make: https://github.com/OctoMap/octomap/compare/devel...sgolodetz:winchanges