When compiling error in libs\curl\libcurl.lib
I installed from scratch VisualStudio 2017 (with options turned on for PC gaming/Unity/C++/etc), OS: WINDOWS10.
After getting the sources I created the etlegacy\build directory, then cd build and
cmake -G "NMake Makefiles" -DBUNDLED_LIBS=YES .. && nmake
After a while it stops with:
It seems that there is a misuderstanding where the file libcurl.lib should be.
... Scanning dependencies of target renderer_opengl2_x86 [ 41%] Building C object CMakeFiles/renderer_opengl2_x86.dir/glsl/tr_glslsources.c.obj tr_glslsources.c [ 42%] Linking C shared module renderer_opengl2_x86.dll [ 50%] Built target renderer_opengl2_x86 [ 50%] Built target bundled_sdl NMAKE : fatal error U1073: impossibile creare 'libs\curl\libcurl.lib' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.exe"' : codice restituito '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.exe"' : codice restituito '0x2' Stop. D:\etlegacy\build>
- etlegacy\build\libs\curl\libcurl.lib (this does not exist)
Infact I have a (stupid)
to copy the first file to the second folder.
Then the compilation works
#2 Updated by IR4T4 over 2 years ago
I’v had a similar error after checking out the latest changes from our lib submodule:
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.." CMakeFiles/bundled_curl.dir/build.make:51: recipe for target '../libs/curl/lib/.libs/libcurl.a' failed make: [../libs/curl/lib/.libs/libcurl.a] Error 1 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/bundled_curl.dir/all' failed
After cleaning the working directories, deleting the libs folder with new checkout the issue was gone.
Did you use an old repository path which was used before for your new VS17 install?
This issue is still relevant in VS19. A possible fix or workaround (or whatever) is here:
I have used the piece of text (from the link) to fix the issue locally.
Yup, and I’m still waiting for you to confirm this works in both release and debug build - See the very same PR you linked to.
To expand on this, NMAKE tends to use a different`CMAKE_STATIC_LIBRARY_SUFFIX` in debug mode, which means your change might break here (not sure if that applies to curl though).