Reputation: 53
I am getting this error while trying to build triangle (The source file can be accessed from here: https://github.com/drufat/triangle) from source:
` c1: fatal error C1083: Cannot open source file: 'c/triangle.c': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe' failed with exit code 2
` I am using Windows 11, anaconda 3, python 3.9.17 I tried installing different versions of microsoft build tools but I get the same error every time. I even tried on a different machine with different version of anaconda and python, but still im getting the same error. Can somebody help me in fixing this issue?
Upvotes: -1
Views: 227
Reputation: 86671
If you look at GitHub, you'll see there is a c
directory but it looks like this:
c @ 8b9e104
This means it is a submodule. You need to do extra steps to pull it down. If you clone the repo, you need to go into it and then execute the following two commands
git submodule init
git submodule update
See the following (done on a Mac but the idea is the same)
jeremyp@mymachine dev % git clone https://github.com/drufat/triangle.git
Cloning into 'triangle'...
remote: Enumerating objects: 771, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 771 (delta 11), reused 33 (delta 9), pack-reused 725
Receiving objects: 100% (771/771), 1.83 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (362/362), done.
jeremyp@mymachine dev % cd triangle
jeremyp@mymachine triangle % ls
LICENSE README.rst c doc pyproject.toml setup.py tests triangle
jeremyp@mymachine triangle % ls c
jeremyp@mymachine triangle % git submodule init
Submodule 'c' (https://github.com/drufat/triangle-c) registered for path 'c'
jeremyp@mymachine triangle % ls c
jeremyp@mymachine triangle % git submodule update
Cloning into '/Users/jeremyp/dev/triangle/c'...
Submodule path 'c': checked out '8b9e1046e5cddab1298d3204f10c93665836cf99'
jeremyp@mymachine triangle % ls c
A.poly CMakeLists.txt README makefile showme.c triangle.c triangle.h tricall.c
Upvotes: 2