Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: library 'zip' not found #419

Closed
jakitliang opened this issue Jan 12, 2024 · 2 comments
Closed

ld: library 'zip' not found #419

jakitliang opened this issue Jan 12, 2024 · 2 comments
Labels
bug libzip doesn't behave as expected.

Comments

@jakitliang
Copy link

jakitliang commented Jan 12, 2024

Describe the Bug
Find libzip
find_package(libzip REQUIRED)

Then I can see libzip is included and found by print them with-D CMAKE_FIND_DEBUG_MODE=ON

But I can't link it with:
target_link_libraries(myApp zip)

And error comes with:
ld: library 'zip' not found

But your example writes target_link_libraries(${PROGRAM} zip) in your https://github.com/nih-at/libzip/blob/main/examples/CMakeLists.txt

So the official example was a scam?

Expected Behavior
target_link_libraries(myApp zip) Should worked and links good.

Observed Behavior
target_link_libraries(myApp zip) Doesn't link the library and prints ld: library 'zip' not found ERROR

To Reproduce
You can try your self.

libzip Version
1.10.1

Operating System
macOS Sonoma

Test Files
N/A

Additional context
N/A

@jakitliang jakitliang added the bug libzip doesn't behave as expected. label Jan 12, 2024
@jakitliang
Copy link
Author

The package I built is here.

libzip.zip

@0-wiz-0
Copy link
Member

0-wiz-0 commented Jan 12, 2024

You're not using it correctly, use

target_link_libraries(${PROGRAM} libzip::zip)

@0-wiz-0 0-wiz-0 closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug libzip doesn't behave as expected.
Projects
None yet
Development

No branches or pull requests

2 participants