Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

no matching function for call to QString::arg()



  • Hi,
    i am getting errors related to Qt while compiling CGAL library. i checked the qt version & i am getting:

    qmake --version
    Qmake version: 1.07a (Qt 3.3.8b)
    Qmake is free software from Trolltech ASA.

    I suppose that the error is regarding missing Qt4 library on my system. I'll install Qt4 but i need to know the minimum version of QT4 which can fix this issue.

    The compilation line & error is as:-

    cd /home/cgal-releases-CGAL-4.0/build/Installation/src/Qt4 && /usr/bin/c++ -DCGAL_Qt4_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -frounding-math -O3 -DNDEBUG -fPIC -I/home/cgal-releases-CGAL-4.0/GraphicsView/src/CGALQt4/../../include -I/home/cgal-releases-CGAL-4.0/build/include -I/home/cgal-releases-CGAL-4.0/CGALimageIO/include -I/home/cgal-releases-CGAL-4.0/Core/include -I/home/cgal-releases-CGAL-4.0/Arrangement_on_surface_2/include -I/home/cgal-releases-CGAL-4.0/Nef_2/include -I/home/cgal-releases-CGAL-4.0/Testsuite/include -I/home/cgal-releases-CGAL-4.0/Convex_hull_2/include -I/home/cgal-releases-CGAL-4.0/Union_find/include -I/home/cgal-releases-CGAL-4.0/Intersections_2/include -I/home/cgal-releases-CGAL-4.0/Periodic_3_triangulation_3/include -I/home/cgal-releases-CGAL-4.0/Generator/include -I/home/cgal-releases-CGAL-4.0/Width_3/include -I/home/cgal-releases-CGAL-4.0/BGL/include -I/home/cgal-releases-CGAL-4.0/Minkowski_sum_3/include -I/home/cgal-releases-CGAL-4.0/Algebraic_kernel_d/include -I/home/cgal-releases-CGAL-4.0/Nef_3/include -I/home/cgal-releases-CGAL-4.0/Manual/include -I/home/cgal-releases-CGAL-4.0/Intersections_3/include -I/home/cgal-releases-CGAL-4.0/Skin_surface_3/include -I/home/cgal-releases-CGAL-4.0/Algebraic_kernel_for_spheres/include -I/home/cgal-releases-CGAL-4.0/Polyhedron/include -I/home/cgal-releases-CGAL-4.0/Homogeneous_kernel/include -I/home/cgal-releases-CGAL-4.0/QP_solver/include -I/home/cgal-releases-CGAL-4.0/Convex_decomposition_3/include -I/home/cgal-releases-CGAL-4.0/MacOSX/include -I/home/cgal-releases-CGAL-4.0/Min_sphere_d/include -I/home/cgal-releases-CGAL-4.0/Alpha_shapes_3/include -I/home/cgal-releases-CGAL-4.0/Nef_S2/include -I/home/cgal-releases-CGAL-4.0/Algebraic_kernel_for_circles/include -I/home/cgal-releases-CGAL-4.0/Principal_component_analysis/include -I/home/cgal-releases-CGAL-4.0/Interval_support/include -I/home/cgal-releases-CGAL-4.0/Convex_hull_3/include -I/home/cgal-releases-CGAL-4.0/Circular_kernel_2/include -I/home/cgal-releases-CGAL-4.0/Maintenance/include -I/home/cgal-releases-CGAL-4.0/iostream/include -I/home/cgal-releases-CGAL-4.0/kdtree/include -I/home/cgal-releases-CGAL-4.0/Number_types/include -I/home/cgal-releases-CGAL-4.0/Snap_rounding_2/include -I/home/cgal-releases-CGAL-4.0/SearchStructures/include -I/home/cgal-releases-CGAL-4.0/Polyhedron_IO/include -I/home/cgal-releases-CGAL-4.0/Envelope_2/include -I/home/cgal-releases-CGAL-4.0/Installation/include -I/home/cgal-releases-CGAL-4.0/Manual_tools/include -I/home/cgal-releases-CGAL-4.0/Modular_arithmetic/include -I/home/cgal-releases-CGAL-4.0/Interpolation/include -I/home/cgal-releases-CGAL-4.0/Profiling_tools/include -I/home/cgal-releases-CGAL-4.0/Surface_mesh_parameterization/include -I/home/cgal-releases-CGAL-4.0/Min_sphere_of_spheres_d/include -I/home/cgal-releases-CGAL-4.0/Partition_2/include -I/home/cgal-releases-CGAL-4.0/Ridges_3/include -I/home/cgal-releases-CGAL-4.0/Straight_skeleton_2/include -I/home/cgal-releases-CGAL-4.0/Kinetic_data_structures/include -I/home/cgal-releases-CGAL-4.0/Spatial_sorting/include -I/home/cgal-releases-CGAL-4.0/Developers_manual/include -I/home/cgal-releases-CGAL-4.0/Cartesian_kernel/include -I/home/cgal-releases-CGAL-4.0/Kernel_d/include -I/home/cgal-releases-CGAL-4.0/Robustness/include -I/home/cgal-releases-CGAL-4.0/Surface_mesh_simplification/include -I/home/cgal-releases-CGAL-4.0/Combinatorial_map/include -I/home/cgal-releases-CGAL-4.0/Optimisation_doc/include -I/home/cgal-releases-CGAL-4.0/Mesh_2/include -I/home/cgal-releases-CGAL-4.0/Qt_widget/include -I/home/cgal-releases-CGAL-4.0/Box_intersection_d/include -I/home/cgal-releases-CGAL-4.0/Surface_reconstruction_points_3/include -I/home/cgal-releases-CGAL-4.0/Linear_cell_complex/include -I/home/cgal-releases-CGAL-4.0/Random_numbers/include -I/home/cgal-releases-CGAL-4.0/STL_Extension/include -I/home/cgal-releases-CGAL-4.0/Modifier/include -I/home/cgal-releases-CGAL-4.0/Jet_fitting_3/include -I/home/cgal-releases-CGAL-4.0/Minkowski_sum_2/include -I/home/cgal-releases-CGAL-4.0/Alpha_shapes_2/include -I/home/cgal-releases-CGAL-4.0/Min_ellipse_2/include -I/home/cgal-releases-CGAL-4.0/Scripts/include -I/home/cgal-releases-CGAL-4.0/Polygon/include -I/home/cgal-releases-CGAL-4.0/AABB_tree/include -I/home/cgal-releases-CGAL-4.0/Min_quadrilateral_2/include -I/home/cgal-releases-CGAL-4.0/wininst/include -I/home/cgal-releases-CGAL-4.0/Circular_kernel_3/include -I/home/cgal-releases-CGAL-4.0/HalfedgeDS/include -I/home/cgal-releases-CGAL-4.0/Optimisation_basic/include -I/home/cgal-releases-CGAL-4.0/LEDA/include -I/home/cgal-releases-CGAL-4.0/Arithmetic_kernel/include -I/home/cgal-releases-CGAL-4.0/Envelope_3/include -I/home/cgal-releases-CGAL-4.0/Subdivision_method_3/include -I/home/cgal-releases-CGAL-4.0/Algebraic_foundations/include -I/home/cgal-releases-CGAL-4.0/Voronoi_diagram_2/include -I/home/cgal-releases-CGAL-4.0/Triangulation_2/include -I/home/cgal-releases-CGAL-4.0/CGAL_ipelets/include -I/home/cgal-releases-CGAL-4.0/OpenNL/include -I/home/cgal-releases-CGAL-4.0/Hash_map/include -I/home/cgal-releases-CGAL-4.0/Inventor/include -I/home/cgal-releases-CGAL-4.0/Matrix_search/include -I/home/cgal-releases-CGAL-4.0/Min_circle_2/include -I/home/cgal-releases-CGAL-4.0/Geomview/include -I/home/cgal-releases-CGAL-4.0/Filtered_kernel/include -I/home/cgal-releases-CGAL-4.0/Solver_interface/include -I/home/cgal-releases-CGAL-4.0/Conic_2/include -I/home/cgal-releases-CGAL-4.0/Boolean_set_operations_2/include -I/home/cgal-releases-CGAL-4.0/Approximate_min_ellipsoid_d/include -I/home/cgal-releases-CGAL-4.0/Apollonius_graph_2/include -I/home/cgal-releases-CGAL-4.0/Mesh_3/include -I/home/cgal-releases-CGAL-4.0/Stream_lines_2/include -I/home/cgal-releases-CGAL-4.0/GraphicsView/include -I/home/cgal-releases-CGAL-4.0/Interval_skip_list/include -I/home/cgal-releases-CGAL-4.0/Polynomial/include -I/home/cgal-releases-CGAL-4.0/Stream_support/include -I/home/cgal-releases-CGAL-4.0/Kernel_23/include -I/home/cgal-releases-CGAL-4.0/Circulator/include -I/home/cgal-releases-CGAL-4.0/Segment_Delaunay_graph_2/include -I/home/cgal-releases-CGAL-4.0/Largest_empty_rect_2/include -I/home/cgal-releases-CGAL-4.0/Distance_3/include -I/home/cgal-releases-CGAL-4.0/Convex_hull_d/include -I/home/cgal-releases-CGAL-4.0/Point_set_processing_3/include -I/home/cgal-releases-CGAL-4.0/Min_annulus_d/include -I/home/cgal-releases-CGAL-4.0/Surface_mesher/include -I/home/cgal-releases-CGAL-4.0/Polytope_distance_d/include -I/home/cgal-releases-CGAL-4.0/Triangulation_3/include -I/home/cgal-releases-CGAL-4.0/Spatial_searching/include -I/home/cgal-releases-CGAL-4.0/Point_set_2/include -I/home/cgal-releases-CGAL-4.0/Distance_2/include -I/home/cgal-releases-CGAL-4.0/build/Installation/src/Qt4 -isystem /usr/include/QtOpenGL -isystem /usr/include/QtGui -isystem /usr/include/QtCore -o CMakeFiles/CGAL_Qt4.dir/all_files.cpp.o -c /home/cgal-releases-CGAL-4.0/build/Installation/src/Qt4/all_files.cpp

    Building CXX object Installation/src/Qt4/CMakeFiles/CGAL_Qt4.dir/qrc_Triangulation_2.cxx.o
    In file included from /home/cgal-releases-CGAL-4.0/build/Installation/src/Qt4/all_files.cpp:5:
    /home/cgal-releases-CGAL-4.0/GraphicsView/src/CGALQt4/DemosMainWindow.cpp: In member function ‘void CGAL::Qt::DemosMainWindow::popupAboutBox(QString, QString)’:
    /home/cgal-releases-CGAL-4.0/GraphicsView/src/CGALQt4/DemosMainWindow.cpp:218: error: no matching function for call to QString::arg
    /usr/include/QtCore/qstring.h:133: note: candidates are: QString QString::arg(qlonglong, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:135: note: QString QString::arg(qulonglong, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:736: note: QString QString::arg(long int, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:738: note: QString QString::arg(ulong, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:732: note: QString QString::arg(int, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:734: note: QString QString::arg(uint, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:740: note: QString QString::arg(short int, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:742: note: QString QString::arg(ushort, int, int, const QChar&) const
    /usr/include/QtCore/qstring.h:149: note: QString QString::arg(double, int, char, int, const QChar&) const
    /usr/include/QtCore/qstring.h:151: note: QString QString::arg(char, int, const QChar&) const
    /usr/include/QtCore/qstring.h:153: note: QString QString::arg(QChar, int, const QChar&) const
    /usr/include/QtCore/qstring.h:155: note: QString QString::arg(const QString&, int, const QChar&) const
    /usr/include/QtCore/qstring.h:744: note: QString QString::arg(const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:746: note: QString QString::arg(const QString&, const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:748: note: QString QString::arg(const QString&, const QString&, const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:751: note: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:754: note: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:757: note: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:761: note: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
    /usr/include/QtCore/qstring.h:765: note: QString QString::arg(const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&, const QString&) const
    make[2]: *** [Installation/src/Qt4/CMakeFiles/CGAL_Qt4.dir/all_files.cpp.o] Error 1
    make[1]: *** [Installation/src/Qt4/CMakeFiles/CGAL_Qt4.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....



  • @puneet336

    Hi and welcome to devnet

    It looks a bit like you try compile something of or with Qt3.
    Note: we have already version Qt5

    Typically you find the documentation a reference as
    "This function was introduced in Qt4.4"
    when a function has been introduced later as an update. E.g. here
    For QString::arg there are no entrances like this or I simply missed it. The conclusion would be that already Qt4.0 had the functionality. Please check yourself


Log in to reply