Vortico
Vortico

Reputation: 2749

Static link with Premake

I'm using premake4 on Linux to build a project which links to a third party .a file.

Neither links {"foo"} nor links {"libfoo.a"} work, since premake generates a build script which incorrectly uses the flag -lfoo as if I'm linking a shared library. Using files {"libfoo.a"} will make premake ignore the file since it isn't C.

Upvotes: 0

Views: 1847

Answers (1)

J. Perkins
J. Perkins

Reputation: 4276

Premake4 is getting awfully old at this point. Is switching to Premake5 an option?

If not, one hacky workaround would be to use linkoptions to emit the link flags however you would like them to appear.

Upvotes: 1

Related Questions