Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

error: ‘vcg::math::Swap’ is not a class member

Help
jstults
2013-02-18
2013-07-26
  • jstults
    jstults
    2013-02-18

    I am attempting to compile meshlab from source; I downloaded 'MeshLabSrc_AllInc_v132.tgz', following the instructions on the wiki, I unpacked it changed to the meshlab/src directory and executed

    $ qmake-qt4 -recursive meshlab_mini.pro

    which seems to work fine, and then when I try 'make' I get this compile error:

    In file included from meshmodel.h:52:0,
    from filterparameter.cpp:31:
    ../../../vcglib/wrap/gl/trimesh.h: In function ‘void vcg::Crease(MESH_TYPE&, typename MESH_TYPE::scalar_type)’:
    ../../../vcglib/wrap/gl/trimesh.h:1006:9: error: ‘vcg::math::Swap’ is not a class member
    make[1]: *** [filterparameter.o] Error 1

    Do I need to compile the vgclib stuff first?

     
  • David Koes
    David Koes
    2013-07-12

    Had the same error. Apparently, you need to use an early version of g++ (or alternatively, I guess you could figure out how to fix the code).
    make CXX=g++-4.4
    did the trick for me.

     
  • Dan Gifford
    Dan Gifford
    2013-07-24

    I am using gcc version 4.7. The documentation on the site does not say this should be an issue. Have I missed something?

     
  • Dan Gifford
    Dan Gifford
    2013-07-25

    I just ran make on Debian with gcc 4.4. Nothing changed. Any help would be appreciated. Here is the output:

    dgifford@debian-gifford-engineering:~/code/MeshLabSrc_AllInc_v132/meshlab/src$ qmake -recursive meshlab_full.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/common/common.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlab/meshlab.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabserver/meshlabserver.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_base/io_base.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_bre/io_bre.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_collada/io_collada.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_ctm/io_ctm.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_json/io_json.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_u3d/io_u3d.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_tri/io_tri.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_x3d/io_x3d.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_gts/io_gts.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_expe/io_expe.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/io_pdb/io_pdb.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_aging/filter_aging.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_ao/filter_ao.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_autoalign/filter_autoalign.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_camera/filter_camera.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_bnpts/filter_bnpts.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_clean/filter_clean.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_colorize/filter_colorize.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_colorproc/filter_colorproc.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_color_projection/filter_color_projection.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_create/filter_create.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_dirt/filter_dirt.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_fractal/filter_fractal.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_func/filter_func.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_img_patch_param/filter_img_patch_param.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_isoparametrization/filter_isoparametrization.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_layer/filter_layer.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_measure/filter_measure.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_meshing/filter_meshing.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_mutualinfoxml/filter_mutualinfoxml.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_mls/filter_mls.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_photosynth/filter_photosynth.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_plymc/filter_plymc.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_poisson/filter_poisson.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_qhull/filter_qhull.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_quality/filter_quality.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_sampling/filter_sampling.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_sdfgpu/filter_sdfgpu.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_select/filter_select.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_ssynth/filter_ssynth.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_texture/filter_texture.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_trioptimize/filter_trioptimize.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_unsharp/filter_unsharp.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/filter_zippering/filter_zippering.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/render_splatting/render_splatting.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/render_gdp/render_gdp.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/render_radiance_scaling/render_radiance_scaling.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/render_rfx/render_rfx.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/decorate_base/decorate_base.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/decorate_background/decorate_background.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/decorate_shadow/decorate_shadow.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_select/edit_select.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_pickpoints/edit_pickpoints.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_align/edit_align.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_measure/edit_measure.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_hole/edit_hole.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_paint/edit_paint.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_point/edit_point.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_quality/edit_quality.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_texture/edit_texture.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_manipulators/edit_manipulators.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/sampleplugins/sampleedit/sampleedit.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/sampleplugins/samplefilter/samplefilter.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/sampleplugins/samplefilterdyn/samplefilterdyn.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/sampleplugins/io_m/io_m.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/sampleplugins/filtergeodesic/filtergeodesic.pro
    Reading /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/sampleplugins/filtercreateiso/filtercreateiso.pro
    dgifford@debian-gifford-engineering:~/code/MeshLabSrc_AllInc_v132/meshlab/src$ make CC='/usr/bin/gcc-4.4'
    cd common/ && make -f Makefile
    make[1]: Entering directory /home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/common' g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_WEBKIT -DGLEW_STATIC -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I../.. -I../../../vcglib -I../external/glew-1.7.0/include -I. -I../external/jhead-2.95 -I/usr/X11R6/include -I. -o filterparameter.o filterparameter.cpp In file included from meshmodel.h:52:0, from filterparameter.cpp:31: ../../../vcglib/wrap/gl/trimesh.h: In function ‘void vcg::Crease(MESH_TYPE&, typename MESH_TYPE::scalar_type)’: ../../../vcglib/wrap/gl/trimesh.h:1006:9: error: ‘vcg::math::Swap’ is not a class member make[1]: *** [filterparameter.o] Error 1 make[1]: Leaving directory/home/dgifford/code/MeshLabSrc_AllInc_v132/meshlab/src/common'
    make: *** [sub-common-make_default-ordered] Error 2
    dgifford@debian-gifford-engineering:~/code/MeshLabSrc_AllInc_v132/meshlab/src$

     
  • Dan Gifford
    Dan Gifford
    2013-07-25

    What is the exact compiler version that you are using?

     
  • Paolo Cignoni
    Paolo Cignoni
    2013-07-26

    I just removed all references to the useless vcg::math::Swap
    I hope it solve this issue....