Compiling Meshlab

转载 2012年03月10日 20:56:36

What you need

To compile MeshLab you need a C++ compiling environment, (we regularly compile meshlab under VisualStudio 2005, gcc and xcode) and the following libraries:

  • Qt 4.4 (note that Qt 4.4 are required, Qt versions < 4.4 could not compile). Current version of MeshLab compiles well against Qt 4.4.3.
  • the VCG libraries;, this library is not distributed by means of easy-to-download packages, but it is only accessible through anonymous svn (svn string: svn co vcg ). If you get the current version of the VCG library we suggest you to also get the current version of MeshLab. If you want to compile the distributed sources check out from the repository the VCG lib with the same date of the release of MeshLab.
  • MeshLab's source code version 1.2.1. Now you have two different options:

External Dependencies

MeshLab and MeshLab's plugins invokes functions exported by external libraries. The code of all these libraries is normally included in the MeshLab's source code package. You can find it in the folder external in the MeshLab source tree.

  • glew ( ), strongly required. You just need the sources (.h and .c), (not the compiled libs), glew is statically compiled into meshlab, so no dynamic libraries are required.
  • lib3ds-1.3.0 ( ) This one is needed only for the io_3ds plugin. Without this plugin the 3ds file formats will not be parsed.
  • bzip2-1.0.3 this one is required only for the epoch format import plugins; if you do not have datasets produced with the arc3D web reconstruction service, you do not need this plugin.
  • muParser 1.30 ( ) This library is needed for filter_func plugin.

In order to successfully compile a MeshLab's plugin with external dependency you have before to compile the referred library and put it into the folder meshlab/src/external/lib/YOUR_OS where YOUR_OS is a string related to your operating system and compiler according to QMAKESPEC definition (like for example macx or win32-msvc2005).
Into the folder external a .pro file,, has been provided to easily compile all the external libraries. To do this you can either:

  • use a Qt-friendly IDE, like Qt Creator, Visual Studio or Eclipse (the last two with the IDE's Qt integration provided by Trolltech)
  • use command line.
qmake -recursive 

A note: when we say that a library is needed only for a specific plugin we mean that if you do not have that library you should not try to compile that specific plugin otherwise the compilation of that plugin could fail on that plugin and, depending on your compiling environment, the whole compilation could stop. To avoid the compilation of problematic plugins simply comments the relative line (adding a # at the beginning of the line) in the src/meshlabplugins/

Code tree structure

The meshlab sources and the vcg library must be at the same level and the vcg library root should be named 'vcglib'. The external compiled libraries should be placed in a dir named ~/devel/meshlab/external/lib/YOUR_OS (see the above section).
You should have setup your directories in a way that should be similar to the following ones (obviously you are not forced to call your base dir devel or to put it under your home dir):


If you put things in dirs with different relations, you have to manually change the .pro. Please note that if you are a developer that will soon or later submit back its work, it is strongly deprecated that you use your own version of .pro files: use the standard setup.


The compiling step depends on the compiling environment. Using GCC (both under linux and using the mingw gcc provided with the free Qt distribution) you should just type, from the devel/meshlab/src directory:

qmake -recursive

the devel/meshlab/src directory contains also the project that contains a much smaller set of the meshlab plugins, easier (no need for lib3ds and bzip) and faster to be compiled.

Under windows the suggested platform is the one formed by the open source version of Qt with the mingw gcc compiler that is kindly included in the open source Qt distribution available from TrollTech.

If you want to use Visual Studio, please buy the commercial version of Qt that offers a nice integration of the Qt tools into the Visual Studio IDE. In that case you simply have to import the top level pro ( ~/devel/meshlab/src/ ) into VisualStudio.

Using Microsoft Visual Studio 8 express edition and QT

It is possible to use the Visual Studio 8 express edition (the one free from MS). Simple steps for the lazy ones:

  • download and install Microsoft Visual Studio 8 express edition
  • download from trolltech QT 4.4.3 , the zip with the sources not the precompiled bin for mingw.
  • unzip it and rename the created folder to c:/Qt/4.4.3 (or something different if you already have installed the qt distribution with mingw.
  • Now open the visual studio console (program files->visual studio 2008-> vs 2008 tools-> vs 2008 command promt). Go to the directory where you unzipped qt and type configure -debug-and-release. Wait a few mins (it compiles qmake and runs it, creating the makefiles for vs2008)
  • type nmake. Wait a few hours (it recompiles the whole Qt).
  • last step: prepare the environment; you have to add to the environment of vs8 command prompt:
set QTDIR=C:/Qtvs/4.4.3
set PATH=C:/Qtvs/4.4.3/bin
set PATH=%PATH%;%SystemRoot%/System32
set QMAKESPEC=win32-msvc2008
  • after that just start that enhanced vs8 command prompt, go in the appropriate dir, type
qmake -tp vc -recursive
  • and magically a solution that contains meshlab and all the plugins will appear.
  • In some cases it could help also to configure visual C++, so it can see always Qt: (tools->options) and add: $(QTDIR)/include to the include directories and $(QTDIR)/lib to the lib directories, but it should not be required (and perhaps a bit dangerous if you upgrade qt).

meshlab for mac v1.3.3

  • 2015年03月22日 23:13
  • 28.02MB
  • 下载

meshlab-v1.33 win64 window7下

  • 2014年10月04日 15:21
  • 32.49MB
  • 下载

cross-compiling for iPhone dev Update: Proof-of-concept d...
  • phiger
  • phiger
  • 2011年08月28日 15:33
  • 807

Meshlab v1.3.0a源码

  • 2011年11月21日 14:09
  • 11.56MB
  • 下载


  • 2014年09月02日 17:34
  • 3.33MB
  • 下载

Compiling Opencv2.3.1 with ffmpeg to read the MP4

编译条件主机(Host): Virtual box + Unbuntu12.04 单板机:Freescale imx6 交叉编译器版本:4.6.2 20110630 (不支持C11) cmak...
  • FreeApe
  • FreeApe
  • 2016年09月03日 00:25
  • 715

Problems compiling Postgis from source in Ubuntu 9.10

Hi All, - I got the following error when I ran configure: $ sudo ./configure --with-pgsql=/usr/l...

6.087 Practical Programming in C, lec1:Introduction. Writing, compiling, and debugging C programs.

前言:最近通过MIT OCW的6.087 Practial Programming in C来复习C语言,对照了下6.087的课程设置与C Programming Language的章节结构,感觉两者...
  • jubincn
  • jubincn
  • 2011年10月12日 23:08
  • 829

运行Tcode时为什么总是显示Compiling XXX in separate task

    刚安装好SAP ECC6.0 IDES时,激动的不得了。迫不及待的LOGON,想验证下几天来的辛苦的劳动成果。可是发现每次运行新的Tcode时总是提示Compiling XXX in sepa...

Compiling and linking error when using NDK r10 to build cocos2d-x v3.2

用ndk r10编译cocos2dx NDK r10 has problem, refer to [this ticket](
  • shudaiu
  • shudaiu
  • 2014年08月09日 09:49
  • 1148
您举报文章:Compiling Meshlab