Fatal Error Qglwidget No Such File Or Directory
Contents |
here for a quick overview of the site qopenglwidget: no such file or directory Help Center Detailed answers to any questions you might qopenglwidget not found have Meta Discuss the workings and policies of this site About Us Learn more
Install Qt With Opengl
about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Qt5 Qopenglwidget
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Cmake cannot find QGLWidget up vote 0 down vote favorite I have qopenglwidget missing a simple bouncing ball program that I wrote in QtCreator on Windows a couple years ago, and now I'm trying to rebuild it on Linux (Ubuntu 14.04) using CMakeLists instead of the Qt project files. My CMakeLists.txt file (loosely based off the cmake file in this question is below. cmake_minimum_required ( VERSION 2.6 ) project ( BouncyBall ) find_package ( Qt4 COMPONENTS QtGui QtOpenGL REQUIRED ) set (QT_USE_QTOPENGL TRUE) include(${QT_USE_FILE}) add_definitions(${QT_DEFINITIONS}) include_directories( ${QT_QTOPENGL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ) find_package ( Bullet REQUIRED ) add_executable ( BouncyBall main.cpp BouncyBall.cpp BulletWidget.cpp ) target_link_libraries( BouncyBall ${QT_LIBRARIES} ${BULLET_LIBRARIES} ) Cmake configures and generates the build files without any errors, but fails to compile with the following error: [ 33%] Building CXX object CMakeFiles/BouncyBall.dir/main.cpp.o /usr/bin/c++ -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -isystem /usr/include/qt4 -isystem /usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtGui -I/home/user/Programs/BuildArea/Games/BouncyBall -o CMakeFiles/BouncyBall.dir/main.cpp.o -c /home/user/Programs/Games/BouncyBall/main.cpp In file included from /home/user/Programs/Games/BouncyBall/main.cpp:2:0: /home/user/Programs/Games
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Qglwidget Vs Qopenglwidget
site About Us Learn more about Stack Overflow the company Business Learn qt qglwidget more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question qglwidget qt5 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up cmake http://stackoverflow.com/questions/29812161/cmake-cannot-find-qglwidget error: QGLWidget: No such file or directory up vote 2 down vote favorite I am trying to use cmake with Qt, but I get the following error when I build. QGLWidget: No such file or directory In my CMakeLists.txt file I have: set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) find_package(Qt5Widgets) qt5_use_modules(SHWidget Widgets) c++ qt cmake share|improve this question asked Nov 28 '13 at 12:27 Coffee 608 http://stackoverflow.com/questions/20266235/cmake-error-qglwidget-no-such-file-or-directory Same problem here, sadly it works with .pro, can't convert it to accept in the cmake, have you resolved your issue somehow? –cerkiewny Feb 1 at 15:02 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted As noted in the QtOpenGL module docs: Warning: Apart from the QGLWidget class, this module should not be used anymore for new code. In other words you need to add the QtOpenGL add-on module to your build. share|improve this answer answered Nov 28 '13 at 12:35 cmannett85 14.2k43261 How can I add the QtOpenGL add-on module to my build? I have tried the following: cmake_minimum_required(VERSION 2.8) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(QT_USE_QTOPENGL TRUE) find_package(Qt5Widgets) find_package(Qt5OpenGL) find_package(OpenGL REQUIRED) qt5_use_modules(myprogram Widgets) –Coffee Dec 3 '13 at 8:02 @user2670468 Doesn't it need to be qt5_use_modules(myprogram Widgets OpenGL)? –cmannett85 Dec 3 '13 at 10:25 No, that did not work. –Coffee Dec 3 '13 at 14:05 @user2670468 Then you are doing other things wrong as well, as that is correct: kdab.com/using-cmake-with-qt-5 –cmannett85 Dec 3 '13 at 15:30 Thank you for the referen
giving a problem as : In file included from form.h:5, from form.cpp:2: glwidget.h:5:21: error: http://www.qtcentre.org/archive/index.php/t-6091.html QGLWidget: No such file or directory glwidget.h:8: error: expected class-name before ‘{’ token glwidget.h:36: error: ‘GLuint’ does not name a type glwidget.h:37: error: ‘GLdouble’ has not https://forums.opensuse.org/showthread.php/461908-vapor-2-0-2-build-fatal-error-QGLWidget-No-such-file-or-directory been declared glwidget.h:37: error: ‘GLdouble’ has not been declared glwidget.h:37: error: ‘GLdouble’ has not been declared glwidget.h:37: error: ‘GLdouble’ has not been declared glwidget.h:38: error: ‘GLdouble’ no such has not been declared glwidget.h:38: error: ‘GLdouble’ has not been declared glwidget.h:38: error: ‘GLdouble’ has not been declared glwidget.h:38: error: ‘GLdouble’ has not been declared glwidget.h:39: error: ‘GLdouble’ has not been declared glwidget.h:39: error: ‘GLdouble’ has not been declared glwidget.h:39: error: ‘GLdouble’ has not been declared glwidget.h:39: error: ‘GLdouble’ has not been declared no such file glwidget.h:42: error: ‘GLuint’ does not name a type glwidget.h:8: warning: ‘class GLWidget’ has virtual functions but non-virtual destructor form.cpp: In constructor ‘MainWindow::MainWindow(QMainWindow*)’: form.cpp:41: error: ‘class GLWidget’ has no member named ‘setGeometry’ make: *** [form.o] Error 1 [root@localhost 2and3D]# though i have include QT += opengl in .pro file (is there any implicit way to include this using qmake???) and all the files are there in the Qt installation directory as they are on indos too. no file is missing. all paths are set.. only the QGLWidget thing is giving problem. Can any1 tel me that is it a diff way to do the same on linux coz the same is working properly on windows. Thanks high_flyer14th March 2007, 12:46try: #include
Development Programming/Scripting vapor-2.0.2 build: fatal error: QGLWidget: No such file or directory Welcome! If this is your first visit, be sure to check out the FAQ. You will have to register before you can post in the forums. (Be aware the forums do not accept user names with a dash "-") Also, logging in lets you avoid the CAPTCHA verification when searching . Select Articles, Forum, or Blog. Posting in the Forums implies acceptance of the Terms and Conditions. Page 1 of 4 123 ... Last Jump to page: Results 1 to 10 of 32 Thread: vapor-2.0.2 build: fatal error: QGLWidget: No such file or directory Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 22-Jun-2011,15:14 #1 zuze11 View Profile View Forum Posts View Blog Entries View Articles Student Penguin Join Date Jun 2009 Location Montréal, Canada Posts 71 vapor-2.0.2 build: fatal error: QGLWidget: No such file or directory Hello all, Trying to compile vapor-2.0.2 on OS 11.4, x86_64. The dependencies are the following: Expat 2.0.1, Qt 4.6.1, netCDF 4.0.1, PROJ.4 4.7.0, TIFF 3.8.2, GeoTIFF 1.2.5, Python 2.6.5, NumPy 1.5.0, Glew 1.5.1, HDF5 1.8.3 They are all met or exceeded. The make process uses an options.mk file to set the different locations of include files and libraries. It all goes smoothly up to the following error: Code: make[2]: Entering directory `/home/ziad/vapor-2.0.2/lib/params' ------------------------------------------------------------------------------- Building libparams.so for Linux_x86_64 (DEBUG) ------------------------------------------------------------------------------- make -f Makefile recurse INCLUDEDEPS=1 make[3]: Entering directory `/home/ziad/vapor-2.0.2/lib/params' Compiling flowparams.cpp g++ -o ../../targets/Linux_x86_64/built/params/flowparams.o -c -DLINUX -Wall -Wno-sign-compare -D__USE_LARGEFILE64 -fPIC -m64 -g -DLinux -DQT_OPENGL_LIB -DQT_GUI_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../include -I. -I../../include/vaporinternal -I/usr/include -I/usr/include/Qt -I/usr/include/python2.7 -I/include -I/include/QtCore -I/include/QtGui -I/include/QtOpenGL -Iui -DBINDIR=\"../../targets/Linux_x86_64/bin\" -DDSO_DIR=\"/home/ziad/vapor-2.0.2/targets/Linux_x86_64/bin\" -DABS_TOP=\"/home/ziad/vapor-2.0.2\" -DQTDIR=\"\" flowparams.cpp In file included from flowparams.h:27:0, from flowparams.cpp:29: glutil.h:48:21: fatal error: QGLWidget: No such file or directory compilation terminated. make[3]: *** [../../targets/Linux_x86_64/built/params/flowparams.o] Error 1 make[3]: Le