Compile with paths with spaces ________________________________________________________________________
Applicable Environment
________________________________________________________________________
Topic : Compile with paths that contain spacesSDP : 7.1.0, 7.0.0, 6.6.0, 6.5.0Target : All supported hosts________________________________________________________________________
Question
________________________________________________________________________
My build environment relies on file path that contain spaces. Build tools (qcc) report error:
cc: Can't specify -P, -C, -E, -c or -S with -o and have multiple files
How do I resolve this error?
________________________________________________________________________
Solution ________________________________________________________________________
When you want to compile a file that has a space somewhere in the path, you need to enclose your path
with \" instead of just ".
The backslash makes gcc/qcc recognize the quote as the start/end of a path.
Example:
INCLUDES += -I\"../my\ lib/\"
________________________________________________________________________
NOTE :
This entry has been validated against the SDP version listed above. Use
caution when considering this advice for any other SDP version. For
supported releases, please reach out to QNX Technical Support if you have any questions/concerns.________________________________________________________________________
Please contact us with your questions or concerns.