nmwsharp / geometry-central

Applied 3D geometry in C++, with a focus on surface meshes.
https://geometry-central.net
MIT License
1.1k stars 151 forks source link

Failed to build on Windows #163

Open gdwei opened 1 year ago

gdwei commented 1 year ago

Hi all, I am wondering if anyone has successfuly build geometry-central on Windows, I met some problems when building with cmake. And here are some infos printted in the cmake error log:

. . . CheckFunctionExists.obj : error LNK2019: 无法解析的外部符号 sgemm_,函数 main 中引用了该符号 [E:\Packages\geometry-central\geometry-central\build-vs2022\CMakeFiles\CMakeTmp\cmTC_b0ef4.vcxproj]

. . .

E:\Packages\geometry-central\geometry-central\build-vs2022\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1,10): fatal error C1083: cannot open include file: “pthread.h”: No such file or directory [E:\Packages\geometry-central\geometry-central\build-vs2022\CMakeFiles\CMakeTmp\cmTC_1cb74.vcxproj]

Any suggestion is welcome.

fire commented 1 year ago

I use ninja with cmake and mingw-llvm.

It worked for https://github.com/MarkGillespie/intrinsic-triangulations-demo

fire commented 1 year ago

The current master of geometry-central fails to build for me on:

CMake Error at deps/geometry-central/deps/CMakeLists.txt:158 (file):
  file failed to create symbolic link
  'C:/Users/ernes/Downloads/V-Sekai.intrinsic-triangulations/build/deps/geometry-central/deps/include/nanoflann/nanoflann.hpp':
  A required privilege is not held by the client.
gdwei commented 1 year ago

The current master of geometry-central fails to build for me on:

CMake Error at deps/geometry-central/deps/CMakeLists.txt:158 (file):
  file failed to create symbolic link
  'C:/Users/ernes/Downloads/V-Sekai.intrinsic-triangulations/build/deps/geometry-central/deps/include/nanoflann/nanoflann.hpp':
  A required privilege is not held by the client.

The situation is quite similar to mine. I also successfully build the flip-geodesics-demo in another project of Sharp that also includes geometric-central.

rob-rb commented 11 months ago

I was able to use cmake on windows in a shell with admin-rights.

manuelruivodeoliveira commented 7 months ago

Had the same issue on Windows, apparently regular users do not have permission to create symlinks by default, see https://github.com/golang/dep/issues/773. Also worked fine in an admin shell.