Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Library names with spaces fail

I know that it is highly unlikely for someone to use library names that include spaces, but this can happen when using dependent projects, and they have spaces in the project name, propagated down to the library name.

The problem is that libraries are passed to the linker tool via the LIBS environment variable, which is processed by `ensurePathIsGNUMakeTargetRuleCompatibleSyntax()` to escape spaces, but the code fails, because the libraries are prefixed by -l and the logic does not expect this.

For example in my case resulted lines like:

LIBS += -l"arm\ static\ lib\ spaces"

which fail, there should be no double quotes there, the escaped spaces are enough.

I identified the problem in

where the code expects the double quote only in the first position.

In GNU MCU Eclipse I hacked the class and override the function:

but his is an ugly hack, it would be better to find a more general solution in the upstream CDT.



Back to the top