[Qt-interest] INCLUDEPATH / LIBS with blank spaces
Thiago Macieira
thiago.macieira at trolltech.com
Tue May 19 20:43:16 CEST 2009
Andreas Pakulat wrote:
>On 19.05.09 16:25:59, Oliver.Knoll at comit.ch wrote:
>> Miguel Cardenas wrote on Tuesday, May 19, 2009 3:00 PM:
>> >...if I "quote" them they still are not
>> > found! What can I do?
>>
>> Remove the blanks or Rename_Your_Include_Paths_Like_This?
>
>Or use a buildsystem that doesn't have arbitrary limits. There are
> plenty out there, for example hand-written makefiles, scons, cmake,
> autotools, boost's bjam.
This is not about arbitrary limits. This is about escaping: spaces are
delimiters, so you have to somehow tell the interpreter (and everything
else, by the way) that the particular space in question isn't a delimiter,
but should be treated as just another character.
This limitation isn't exclusive of qmake. You have to know how to escape
your spaces in Makefiles too -- including the escaping necessary for the
shell program that make is going to use. Therefore, the escaping issue
applies to all Makefile-based systems.
CMake, for instance, uses : as separators in library lists (; on Windows).
So, if you're not careful, you'll not be able to use library names
containing those symbols. Also, you have to be careful about spaces on any
argument-replacing language, because of whitespace condensing and
trimming.
Automake is very likely to have the same problem too. Probably even worse,
considering that automake source files are processed into Makefiles, so you
need one more level of escaping.
Scons, however, since it's using a full programming language, is more
likely to be immune to those errors. It doesn't need spaces as separators,
since it can use proper lists and other data structures.
Anyways, qmake supports paths with spaces:
INCLUDEPATH += "/path/with spaces"
LIBS += -L"/path/with spaces"
It does whitespace condensing though. To have more than one space:
INCLUDEPATH += . "/tmp/foo\ \ bar"
LIBS += -L"/tmp/foo\ \ bar" -labc
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090519/04655e98/attachment.bin
More information about the Qt-interest-old
mailing list