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

Static library build in Linux broken by PR #1555 #1680

Open
reos-rcrozier opened this issue Jul 12, 2023 · 0 comments
Open

Static library build in Linux broken by PR #1555 #1680

reos-rcrozier opened this issue Jul 12, 2023 · 0 comments

Comments

@reos-rcrozier
Copy link
Contributor

reos-rcrozier commented Jul 12, 2023

The following line on linux will not link anything into openfastlib_static if openfast_postlib is a static library.

target_link_libraries(openfastlib_static INTERFACE openfast_postlib)

This was addressed by PR #1010 but reverted in PR #1555

From the description of PR #1010 :

On Linux, the linker when creating a static library is ar. ar is just an archiver and doesn't really do a lot more than take a bunch of object files and stuff them in the static library (at least by default with Cmake). ar cannot link an existing library to the static library, one would have to extract the object files from the static library and then use ar to add them. With the current build system, when you try to link to the created static library on Linux, you get undefined references, because ar hasn't actually linked any of the sub-libraries like aerodyn etc.

@reos-rcrozier reos-rcrozier changed the title Static library build in Linux broken by PR #15 Static library build in Linux broken by PR #1555 Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant