Closed naubry closed 8 years ago
I have solved my issue. I replaced in the examples.pri file the following expression :
win32 {
CONFIG *= debug_and_release
# Seems to be needed for Visual Studio with Intel compiler
DEFINES *= WIN32
# Use native OpenGL drivers with Qt5.5
# No longer implicit since the ANGLE driver is now an alternative
LIBS += -lopengl32 -lglu32
isEmpty( QGLVIEWER_STATIC ) {
LIBS *= -L$${LIB_DIR} -lQGLViewer2
} else {
DEFINES *= QGLVIEWER_STATIC
LIBS *= $${LIB_DIR}/libQGLViewer2.a
}
}
by this :
win32 {
# Seems to be needed for Visual Studio with Intel compiler
DEFINES *= WIN32
# Use native OpenGL drivers with Qt5.5
# No longer implicit since the ANGLE driver is now an alternative
LIBS += -lopengl32 -lglu32
CONFIG(debug, debug|release) {
isEmpty( QGLVIEWER_STATIC ) {
LIBS *= -L$${LIB_DIR} -lQGLViewerd2
} else {
DEFINES *= QGLVIEWER_STATIC
LIBS *= $${LIB_DIR}/libQGLViewerd2.lib
}
} else {
isEmpty( QGLVIEWER_STATIC ) {
LIBS *= -L$${LIB_DIR} -lQGLViewer2
} else {
DEFINES *= QGLVIEWER_STATIC
LIBS *= $${LIB_DIR}/libQGLViewer2.lib
}
}
}
thanks for this feedback. I do not have a windows machine to try this out, so I think I'll blindly fix the .pro from your code.
On Mon, Jan 18, 2016 at 6:56 PM, AUBRY Nicolas notifications@github.com wrote:
I have solved my issue. I replaced in the examples.pri file the following expression :
win32 { CONFIG *= debug_and_release
Seems to be needed for Visual Studio with Intel compiler
DEFINES *= WIN32
Use native OpenGL drivers with Qt5.5
No longer implicit since the ANGLE driver is now an alternative
LIBS += -lopengl32 -lglu32
isEmpty( QGLVIEWER_STATIC ) { LIBS = -L$${LIB_DIR} -lQGLViewer2 } else { DEFINES = QGLVIEWER_STATIC LIBS *= $${LIB_DIR}/libQGLViewer2.a }
}
by this :
win32 {
Seems to be needed for Visual Studio with Intel compiler
DEFINES *= WIN32
Use native OpenGL drivers with Qt5.5
No longer implicit since the ANGLE driver is now an alternative
LIBS += -lopengl32 -lglu32
CONFIG(debug, debug|release) { isEmpty( QGLVIEWER_STATIC ) { LIBS *= -L$${LIB_DIR} -lQGLViewerd2 } else { DEFINES *= QGLVIEWER_STATIC LIBS *= $${LIB_DIR}/libQGLViewerd2.lib } } else { isEmpty( QGLVIEWER_STATIC ) { LIBS *= -L$${LIB_DIR} -lQGLViewer2 } else { DEFINES *= QGLVIEWER_STATIC LIBS *= $${LIB_DIR}/libQGLViewer2.lib } }
}
— Reply to this email directly or view it on GitHub https://github.com/GillesDebunne/libQGLViewer/issues/23#issuecomment-172606659 .
Hello,
I have compiled the library with Qt Creator. I have obtained some files like QGLViewer2.dll, QGLViewerd2.dll, QGLViewer2.lib and QGLViewerd2.lib.
After that, I compiled the various examples without error but when I execute one of these, I get this error every time : QWidget: Must construct a QApplication before a QWidget
I have compiled library and examples in the debug profil in Qt Creator 3.6 ; Besides, I am quite confused by the fact that we get the both (debug and release version of the library) when we are in the debug profil in Qt Creator or I missed something ?!