Skip to content

Libraries linked in incorrect order #132

Open
@benjaminmordaunt

Description

@benjaminmordaunt

Take for example a Rust-SDL2 setup with vcpkg, which resolves some dependencies via pkgconfig-rs. Towards the end, we see:

"-Wl,-Bdynamic" "-lSDL2_ttf" "-lSDL2" "-lSDL2main" "-lfreetype" "-lz" "-lpng" "-lpng16" "-lbz2" "-lbrotlidec-static" "-lbrotlienc-static" "-lbrotlicommon-static" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" 

However, this fails to link, claiming there are missing symbols one would expect from zlib. libpng depends on zlib, therefore -lpng should appear before -lz. I'm not exactly sure where this issue is originating from, but if you can investigate, that would be grand.

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