Skip to content
This repository was archived by the owner on Jun 2, 2019. It is now read-only.
This repository was archived by the owner on Jun 2, 2019. It is now read-only.

Sibling & System Lib Order - g++ Linux #9

@mattholley

Description

@mattholley

I have a workspace which has 2 projects, an engine static lib project and a game exectuable project, which is dependant on the engine lib, the engine is dependant on several system libs, however due to g++ link order requirements it is failing to link. It seems that sibling projects are added to the 'Options' attribute of the linker element, and than system libs are added as individual library child elements, however CodeLite resolves the individual libs first, and than adds on the linker options afterwards.

Repro Steps

  • Create a 2 project workspace, 1 lib and 1 executable.
  • Make the executable dependant on the lib, and make the lib dependant on system libs.
  • Attempt to build, notice the order of the linker call ie. '/usr/bin/g++ -o ../Game -lX11 -lXt -lXm -lpthread ../binaries/libEngine.a'
  • Linking fails due to libEngine.a needing to be linked before the system libs.

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