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

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

Open
mattholley opened this issue Dec 5, 2015 · 0 comments
Open

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

mattholley opened this issue Dec 5, 2015 · 0 comments

Comments

@mattholley
Copy link

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant