You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a C++ project that will later be a Web Assembly module to use with JavaScript, not relevant but useful to know where i intend to go with this.
When i clone/run the project I'm getting the error:
[ 87%] Building C object lib/CMakeFiles/zip.dir/zip_mkstempm.c.o
make[3]: *** No rule to make target `/Users/alejandrocamba/Documents/libzippp/lib/zlib-1.2.11/libz.so', needed by `lib/libzip.5.3.dylib'. Stop.make[3]: *** Waiting for unfinished jobs....[ 87%] Building C object lib/CMakeFiles/zip.dir/zip_source_file_stdio_named.c.o[ 87%] Building C object lib/CMakeFiles/zip.dir/zip_random_unix.c.omake[2]: *** [lib/CMakeFiles/zip.dir/all] Error 2make[1]: *** [all] Error 2make: *** [libzip-build-shared] Error 2
I'm using Visual Studio Code and the editor config for c++ files is:
I tried the following workaround based on some online solutions i found:
mkdir build && cd build cmake ..
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Found LIBZIP: /usr/local/lib/libzip.dylib
-- Found BZip2: /usr/lib/libbz2.dylib (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/alejandrocamba/Documents/libzippp/build
make
Scanning dependencies of target libzippp
[ 25%] Building CXX object CMakeFiles/libzippp.dir/src/libzippp.cpp.o
[ 50%] Linking CXX static library libzippp_static.a
[ 50%] Built target libzippp
Scanning dependencies of target libzippp_test
[ 75%] Building CXX object CMakeFiles/libzippp_test.dir/tests/tests.cpp.o
[100%] Linking CXX executable libzippp_static_test
[100%] Built target libzippp_test
I'm able to import the library but when i try tu run the project i finally get the error:
(/project) make
[ 50%] Building CXX object CMakeFiles/startProject.dir/main.cpp.o
[100%] Linking CXX executable startProject
ld: library not found for -llibzip::libzip
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [startProject] Error 1
make[1]: *** [CMakeFiles/startProject.dir/all] Error 2
make: *** [all] Error 2
I've tried other other solutions i've found on the internet but i can't find a way to install libzip from the repo either, when i go to libzippp/lib/libzip-1.7.1/build and run make install i get
make[2]: *** No rule to make target `/Users/alejandrocamba/Documents/libzippp/lib/zlib-1.2.11/libz.so', needed by `lib/libzip.5.3.dylib'. Stop.make[1]: *** [lib/CMakeFiles/zip.dir/all] Error 2make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
Thanks for the report. Since I don't have any Mac, I'm unable to test it, but since all is pretty standard, it should work fine.
As the messages are pointed out, it seems to be a link problem between libzip and zlib, not sure how libzippp is related to that.
I suggest you try vcpkg to work with CMake. Also, another idea would be to try the compilation of libzip (not libzippp) to see if that works.
At this point, I'm unable to provide any more useful help, so I'm close this issue. If you find some problem in the libzippp configuration, please feel free to submit a PR.
I'm working on a C++ project that will later be a Web Assembly module to use with JavaScript, not relevant but useful to know where i intend to go with this.
Click here to go to my GitHub project
When i clone/run the project I'm getting the error:
I'm using Visual Studio Code and the editor config for c++ files is:
I tried the following workaround based on some online solutions i found:
mkdir build && cd build
cmake ..
make
make install
[ 50%] Built target libzippp [100%] Built target libzippp_test Install the project... -- Install configuration: "" -- Installing: /usr/local/lib/libzippp_static.a -- Up-to-date: /usr/local/include/libzippp/libzippp.h -- Installing: /usr/local/share/libzippp/libzipppConfig.cmake -- Installing: /usr/local/share/libzippp/libzipppConfigVersion.cmake -- Up-to-date: /usr/local/share/libzippp/FindLIBZIP.cmake -- Installing: /usr/local/share/libzippp/libzipppTargets.cmake -- Installing: /usr/local/share/libzippp/libzipppTargets-noconfig.cmake
My CMakeLists.txt looks like this:
I'm able to import the library but when i try tu run the project i finally get the error:
(/project) make
I've tried other other solutions i've found on the internet but i can't find a way to install libzip from the repo either, when i go to libzippp/lib/libzip-1.7.1/build and run make install i get
The text was updated successfully, but these errors were encountered: