alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 166 forks source link

Dev vcpkg #140

Closed iAnyKey closed 6 months ago

iAnyKey commented 1 year ago

Summary

Testing

Windows 11 x64

git clone https://github.com/iAnyKey/gptoolbox gpt_lnx -b dev_vcpkg
cd mex
mkdir build && cd build
cmake ..
cmake --build . --config Release

Ubuntu Ubuntu 22.04.1 LTS

Tested on a WSL without installed Matlab, thus enabled matlab proxy for testing.

git clone https://github.com/iAnyKey/gptoolbox gpt_lnx -b dev_vcpkg
cd mex
mkdir build && cd build
cmake .. -DMATLAB_PROXY=ON
make
nkh0472 commented 6 months ago

Problem encountered: cannot find /export:mexFunction: No such file or directory This commit doesn't help.

See full log in: https://github.com/alecjacobson/gptoolbox/issues/150#issuecomment-2026488054

iAnyKey commented 6 months ago

Problem encountered: cannot find /export:mexFunction: No such file or directory This commit doesn't help.

See full log in: #150 (comment)

I never tried to build it with mingw. This version worked well with msvc back then and I was able to build it under windows. Easy way: use msvc instead of mingw. You may have noticed, for whatever reason @alecjacobson didn't merge this PR since about a year and thus I gave up contributing.

alecjacobson commented 6 months ago

oops. probably just never saw it/forgot. thanks for contributing @iAnyKey

nkh0472 commented 6 months ago

Problem encountered: cannot find /export:mexFunction: No such file or directory This commit doesn't help. See full log in: #150 (comment)

I never tried to build it with mingw. This version worked well with msvc back then and I was able to build it under windows. Easy way: use msvc instead of mingw. You may have noticed, for whatever reason @alecjacobson didn't merge this PR since about a year and thus I gave up contributing.

Indeed, MSVC works well. I recently installed Visual Studio 2022 along with MSVC v143 toolchain and the Windows 11 SDK (version 10.0.22621.0).

First time, I mkdir build, used cmake-gui to configure and generate, , but no 'mex' files were generated. Consequently, I attempted to compile by executing cmake --build . --config Release within the 'build' directory. However, the compilation failed after generating approximately 10+ 'mexw64' files, and rerunning the command proved impossible.

For the second attempt, I opted to clean the folder (delete .exp .lib *.mexw64 \build \external). Following exactly the same commands as in the PR above:

mkdir build && cd build
cmake ..
cmake --build . --config Release

This time, the compilation completed successfully!

Thank you for your assistance in navigating this process.