Compiling Meshlab_编译meshlab gloptionstype-程序员宅基地

技术标签: qt  library  compilation  meshlab  plugins  express  microsoft  

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; http://vcg.sf.net, this library is not distributed by means of easy-to-download packages, but it is only accessible through anonymous svn (svn string: svn co https://vcg.svn.sourceforge.net/svnroot/vcg 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:
[ edit]

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 ( http://glew.sourceforge.net/ ), 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 ( http://lib3ds.sourceforge.net/ ) 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 ( http://muparser.sourceforge.net/ ) 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, external.pro, 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 external.pro 
make
 

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/meshlabpluginsv12.pro.

[ edit]

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):

~/devel/vcglib/vcg/space/ 
~/devel/meshlab/src/meshlab/interfaces.h
~/devel/meshlab/external/lib/YOUR_OS

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.

[ edit]

Compiling

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 meshlabv12.pro
make

the devel/meshlab/src directory contains also the meshlab_mini.pro 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/meshlab.pro ) into VisualStudio.

[ edit]

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 meshlabv12.pro
  • 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).
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/zyjiang0571/article/details/7340650

智能推荐

大数据学习之Flink、Flink容错机制的注意事项-程序员宅基地

文章浏览阅读531次,点赞7次,收藏8次。在实际应用中,需要注意一些问题,如避免在Checkpoint期间发生故障、确保Checkpoint和Savepoint的一致性、处理失败的Checkpoint或Savepoint等。

挖洞技巧:支付漏洞之总结_支付功能点的漏洞有哪些-程序员宅基地

文章浏览阅读727次。文章目录前言0x01 修改支付价格0x02 修改支付状态0x03 修改购买数量0x04 修改附属值0x05 修改支付接口0x06 多重替换支付0x07 重复支付0x08 最小额支付0x09 值为最大值支付问题0x10 越权支付0x11 无限制试用0x12 修改优惠价前言支付漏洞一直以来就是高风险,对企业来说危害很大,对用户来说同样危害也大。就比如我用他人账户进行消费,这也属于支付漏洞中的越权问题。那么支付漏洞一般存在在哪些方面呢,根据名字就知道,凡是涉及购买、资金等方面的功能处就_支付功能点的漏洞有哪些

知乎|10个程序员必备免费电子书下载网站_电子书 知乎-程序员宅基地

文章浏览阅读2.4w次,点赞12次,收藏126次。作为开发者,多多少少都会看些技术书籍,许多经典的技术书籍作者都是国外的,等到中文翻译版出来很多书籍可能已经不适用了,购买原版书籍,价格又太高,因此知道一些免费的图书下载网站是非常重要的,下面就和大家分享一下免费的电子书下载网站1、谷歌图书搜索相信没有人不知道谷歌图书,这个网站有很多免费的电子书籍,而且各种格式都有,当然你也可以在上面购买,如果你想下载免费的电子书,首先尝试谷歌图书搜索,一般不会..._电子书 知乎

sort函数与gcd函数的讲解-程序员宅基地

文章浏览阅读1.1k次,点赞30次,收藏21次。通过洛谷题目细致讲解sort函数和gcd函数

python代码编辑器有哪些,python代码用什么工具-程序员宅基地

文章浏览阅读424次,点赞15次,收藏10次。用Python写代码的时候,最重要的就是选择一款得心应手的编辑器,这样不仅能够让工作更简单、更高效,同时还可以提高我们的编码体验和效率,达到事半功倍的效果。它是一个modal editor,可以从文件编辑中分割文件,相比最初的vi,vim有了巨大的进步,功能更加强大。兼容性:Windows、Linux、Mac OS、IOS、android、Unix、AmigaOS、MorphOS。兼容性:Windows、Linux、Mac OS、IOS、Android、UNIX、AmigaOS、MorphOS。

随便推点

Web应用开发基础-程序员宅基地

文章浏览阅读906次,点赞20次,收藏21次。对于web前端学习小白来说,html+css基础尤为重要,可以说是编程小白的必经之路,学完后能写出你看到的静态页面。1)PC端网站布局包含知识点: HTML基础,CSS基础,CSS核心属性;CSS样式层叠,继承,盒模型;容器,溢出及元素类型;浏览器兼容与宽高自适应……2)HTML5+CSS3基础包含知识点: HTML5新增的元素与属性;表单域增强元素;CSS3选择器;文字字体相关样式;CSS3位移与变形处理……3)WebApp页面布局包含知识点: 移动端页面设计规范;移动端切图;_web应用开发基础

模拟实现std::string类(包含完整、分文件程序)-程序员宅基地

文章浏览阅读626次,点赞15次,收藏14次。std库中的string是一个类,对string的模拟实现,既可以复习类的特性,也可以加深对std::string的理解。

数学-洛必达法则_洛必达法则0/0求导-程序员宅基地

文章浏览阅读1.7k次,点赞2次,收藏3次。洛必达法则是在一定条件下通过分子分母分别求导再求极限来确定未定式值的方法[1]。众所周知,两个无穷小之比或两个无穷大之比的极限可能存在,也可能不存在。因此,求这类极限时往往需要适当的变形,转化成可利用极限运算法则或重要极限的形式进行计算。洛必达法则便是应用于这类极限计算的通用方法零比零型若函数和满足下列条件:⑴,;⑵ 在点的某去心邻域内两者都可导,且;..._洛必达法则0/0求导

[转]Java中主线程如何捕获子线程抛出的异常_java 主线程捕获子线程异常-程序员宅基地

文章浏览阅读7.6k次。这么来看待这个问题。首先明确线程代码的边界。其实很简单,Runnable接口的run方法所界定的边界就可以看作是线程代码的边界。Runnable接口中run方法原型如下: << public void run(); >> 而所有的具体线程都实现这个方法,所以这里就明确了一点,线程代码不能抛出任何checked异常。所有的线程中的checked异常都只能被线程本身消化掉。:) 这样本身也是符_java 主线程捕获子线程异常

使用polar()绘制雷达图-程序员宅基地

文章浏览阅读346次,点赞8次,收藏6次。该函数常用参数的含义如下。

性能测试工具wrk之安装使用_wrk win 11-程序员宅基地

文章浏览阅读787次。这里写目录标题介绍linux安装wrk dockerfile使用示例测试报告说明使用 Lualua简单例子介绍WRK的全称是“Windows Research Kernel”,它是微软为高校操作系统课程提供的可修改和跟踪的操作系统教学平台。它给出了Windows这个成功的商业操作系统的内核大部分代码,可以对其进行修改、编译,并且可以用这个内核启动Windows操作系统。可让学生将操作系统基本原理和商业操作系统内核联系起来,进一步加深对操作系统整体的理解。微软的WRK计划(Windows Researc_wrk win 11

推荐文章

热门文章

相关标签