meshlab
meshlab copied to clipboard
Please help build meshlab on windows
Hi,
Thank you for amazing Meshlab.
I searched and followed many links, but could not build meshlab successfully.
Can any body help me steps to download necessary libraries, and build Meshlab on windows? Specially, somethings relating to QT.
I am using:
- Windows 11
- Visual studio 2019/2022
When I build using cmake, got error, but did not see where is QTOpenGL
CMake Error at Qt/qt-everywhere-src-5.15.2/qtbase/src/corelib/Qt5Config.cmake:25 (include): include could not find requested file:
D:/teshMeshLabBuild/meshlab/Qt/qt-everywhere-src-5.15.2/qtbase/src/corelib/Qt5ModuleLocation.cmake
Call Stack (most recent call first): src/CMakeLists.txt:20 (find_package)
CMake Error at Qt/qt-everywhere-src-5.15.2/qtbase/src/corelib/Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5OpenGL" with any of the following names:
Qt5OpenGLConfig.cmake
qt5opengl-config.cmake
Add the installation prefix of "Qt5OpenGL" to CMAKE_PREFIX_PATH or set "Qt5OpenGL_DIR" to a directory containing one of the above files. If "Qt5OpenGL" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/CMakeLists.txt:20 (find_package)
Thank you for your help
I am trying to compile it on Windows too. How did you passed this error:
CMake Error at CMakeLists.txt:13 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
I downloaded qt-everywhere-src-5.15.2 but i don't know what to do with it. I do not even find the Qt5Config.cmake file. I have Qt5Config.cmake.in instead.
I am trying to compile it on Windows too. How did you passed this error:
CMake Error at CMakeLists.txt:13 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one. Could not find a package configuration file provided by "Qt5" with any of the following names: Qt5Config.cmake qt5-config.cmake
I downloaded qt-everywhere-src-5.15.2 but i don't know what to do with it. I do not even find the Qt5Config.cmake file. I have Qt5Config.cmake.in instead.
Hi,
In my case, I search the word qt5config.cmake. It is somewhere in meshlab folder you downloaded. Then, I used set(CMAKE_PREFIX_PATH "to the folder found")
reference: https://stackoverflow.com/questions/47647035/cmake-prefix-path-doesnt-help-cmake-in-finding-qt5
However, although can build, it still has a tons of error. But after that, I could not load any ply files.
Still somethings were wrong in my steps.
I managed to pass most of the errors using Anaconda.
https://www.anaconda.com/download
I have this error remaining:
CMake Error at src/CMakeLists.txt:88 (add_subdirectory):
The source directory
C:/Mesh_Lab-SRC/src/vcglib
does not contain a CMakeLists.txt file.
How did you pass it?
Full log:
full_log.txt
I managed to pass most of the errors using Anaconda. https://www.anaconda.com/download I have this error remaining:
CMake Error at src/CMakeLists.txt:88 (add_subdirectory): The source directory C:/Mesh_Lab-SRC/src/vcglib does not contain a CMakeLists.txt file.
How did you pass it?
Full log: full_log.txt
It seems you did not download vcglib. Check inside vcglib to see if there is the file CMakeList.txt?
You are right thank you :) I was missing the submodule
I first tried the official steps inside git bash. But i had errors:
//----------------------------------------------------------------------------------------------------------------------------------- So I decided to build by progressively fixing the errors i get. I managed to successfullly generate the Cmake Solution and launch Meshlab. Here are the steps:
1) Generate Cmake solution
-
Get Meshlab code with all submodules:
git clone --recurse -submodules https://github.com/cnr-isti-vclab/meshlab.git -
If not installed, download and install Anaconda
-
Open the Anaconda command prompt
-
Remove any previous QT conda uninstall qt
-
Remove any previous PyQT conda uninstall pyqt
-
Install QT
conda install -c anaconda qt -
Install PyQT conda install -c anaconda pyqt
-
Install Eigen conda install eigen
-
Install Cgal conda install -c conda-forge cgal
-
Change directory to Meshlab repository folder
-
Generate solution. For VS2017 64 bits: cmake -G "Visual Studio 15 2017 Win64"
2) Building Mesh lab
-
Open MeshLab.sln
-
Set meshlab vcxproj as startup project
-
Change build configuration to Release(Debug build fails for now)
-
When building Ms build will complain about not finding Eigen files. A workaround is to use absolute directory when including Eigen files.
On my case replace all "<Eigen/" by "<C:/Mesh_Lab-SRC/src/vcglib/eigenlib/Eigen/" -
Build
3) Running Mesh lab
-
When trying to run Meshlab, program will complain about not finding some DLLs. To fix this: a) Download everything
b) For each DLL not found -> Search for the DLL using everything -> Select the DLL inside Anaconda path -> Copy the DLL to src\distrib\Release -
Once all DLL are present, program will complain about QT plugin not initialized.
To fix this add an environment variable QT_PLUGIN_PATH with value your Anaconda plugin directory. In my case C:\Users\Studente\anaconda3\Library\plugins"
- You should be able to run MeshLab now
ISSUES
While I am able to compile and run the the software. I am currently unable to load meshes:
-
Unable to open MLP file
-
Unable to import OBJ file
OBJ file
Anybody has an idea?
ISSUES
While I am able to compile and run the the software. I am currently unable to load meshes:
- Unable to open MLP file
![]()
- Unable to import OBJ file
OBJ file
Anybody has an idea?
I have the same problem.
I also tried to build following the official steps but inside Anaconda. Build fail with the following errors: Failed.txt
@HungNgoCT Are you able to build in Debug?
I also tried to build following the official steps but inside Anaconda. Build fail with the following errors: Failed.txt
@HungNgoCT Are you able to build in Debug?
@StudenteChamp2 Build in Debug can run to Meshlab GUI, but cannot load any *ply, obj... files And I don't know how to solve
@HungNgoCT Please can you zip and send me the .PDB files you get when building in Debug?
You are modifying the build system and that's a bad idea. You are never going to get a working build with this strategy. You probably did not follow the guide correctly. For example, if you are not able to find Eigen, it means that Eigen is missing. Probably, you did not clone the repo recursively, since Eigen is bundled inside vcg.