Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Cannot open include file: 'qpopupmenu.h'

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Cannot open include file: 'qpopupmenu.h'


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Cannot open include file: 'qpopupmenu.h'
  • Date: Mon, 27 Jun 2011 10:13:28 +0200

You need to add the path to QT3 include to the include path and to link
with QT3 too.

One way to do it is modifying your CMakelist.txt to have
something similar to this:

find_package(CGAL QUIET COMPONENTS QT3)
include( ${CGAL_USE_FILE} )

if ( CGAL_FOUND )

find_package(Qt3-patched)
if(QT3_FOUND)
include_directories( ${QT3_INCLUDE_DIR} )

include( CGAL_CreateSingleSourceCGALProgram )
create_single_source_cgal_program( "main.cpp" )
target_link_libraries(main ${QT3_LIBRARIES})
else()
message(STATUS "This program requires the QT3 library, and will not be compiled.")
endif()
else()
message(STATUS "This program requires the CGAL library, and will not be compiled.")

endif()


Nicholas Mario Wardhana wrote:
Hi all,

With CGAL 3.8 and QT 4.7.3 on Visual Studio 2008, I tested this minimal code:

#include <CGAL/IO/Qt_widget_Nef_3.h>

int main(int argc, char* argv[])
{
return 0;
}

which is basically a stripped off version of the last code in

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Nef_3/Chapter_main.html

and this is the output:


1>------ Build started: Project: CGALTest, Configuration: Release Win32 ------
1>Compiling...
1>main.cpp
1>WARNING: Inclusion of header files from include/Qt is deprecated.
1>WARNING: Inclusion of header files from include/Qt is deprecated.
1>WARNING: Inclusion of header files from include/Qt is deprecated.
1>WARNING: Inclusion of header files from include/Qt is deprecated.
1>D:\nixx\Project\Testbed\dependencies\CGAL-3.8\include\CGAL/IO/Qt_widget_OpenGL.h(33)
: fatal error C1083: Cannot open include file: 'qpopupmenu.h': No such
file or directory
1>Build Time 0:05
1>Build log was saved at
"file://d:\nixx\Project\CGALTest\Release\BuildLog.htm"
1>CGALTest - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Indeed, there was no qpopupmenu.h in Qt directory. I searched on
Qt-related forums, and found here

http://doc.trolltech.com/4.7/porting4.html#qpopupmenu

that "For most purposes, QPopupMenu has been replaced by QMenu in Qt
4. For compatibility with older applications, Q3PopupMenu provides the
old API and features that are specific to pop-up menus. Note that,
when using Q3PopupMenu, the menu's actions must be Q3Actions."

So:

1) I am wondering whether this is obsolete and will be replaced in the
next release? Or is it simply my mistake?

2) I suppose to correct this I have to edit Qt_widget_OpenGL.h and
rebuild the whole CGAL again. Is there a simple workaround for this
problem without doing this?

Thank you.

Best regards,
Nicholas





Archive powered by MHonArc 2.6.16.

Top of Page