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

Dynamic library against static library: remember to add -fPIC #26

Open
ethouris opened this issue Nov 6, 2024 · 0 comments
Open

Dynamic library against static library: remember to add -fPIC #26

ethouris opened this issue Nov 6, 2024 · 0 comments

Comments

@ethouris
Copy link
Owner

ethouris commented Nov 6, 2024

There is a known problem in cmake - fPIC must be manually added when a dynamic library is linked against static one.

This must be somehow detected that a static library is a dependency of a dynamic library, even intermediately.

For cases that cannot be autodetected (e.g. when a dependent library is in a subdirectory), there should be also some special flag (maybe to libspec?) added to this static library database to prepare it for being capable of getting linked a dynamic library against.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant