Skip to content

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

@reos-rcrozier

Description

@reos-rcrozier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions