AnsweredAssumed Answered

chc08 on the commandline - whitespace in -I paths

Question asked by Stuart Warren on Jun 20, 2007
Latest reply on Jun 21, 2007 by CompilerGuru
Hi,

I need to use the chc08 compiler in a makefile. The default installation (c:\program files\...) has spaces in it which the compiler doesn't like when specifying include paths. For example:

"C:/Program Files/Freescale/CodeWarrior for HC08 V5.1/prog/chc08.exe"   -WStdout
On -Ansi -Isrc/CSP/908ey16 -Isrc -IC:/Program Files/Freescale/CodeWarrior for HC
08 V5.1/lib/hc08c/include src/main.c -ObjN=%n.o
make: *** [src/main.o] Error 1

D:\freescale\Devel_with_makefile>type EDOUT
FATAL C50: Input file 'Files/Freescale/CodeWarrior' not found

That was predictable, but trying to escape the spaces with backslashes or enclosing the path with quotes (double and single) fail too:

D:\freescale\Devel_with_makefile>make src/main.o
"C:/Program Files/Freescale/CodeWarrior for HC08 V5.1/prog/chc08.exe"   -WStdout
On -Ansi -Isrc/CSP/908ey16 -Isrc -I"c:/Program Files/Freescale/CodeWarrior for H
C08V5.1/lib/hc08c/include" src/main.c -ObjN=%n.o
make: *** [src/main.o] Error 1

D:\freescale\Devel_with_makefile>type EDOUT
FATAL C50: Input file '-Ic:/Program Files/Freescale/CodeWarrior for HC08V5.1/lib
/hc08c/include' not found

Does anyone know how to use include pathes with spaces in directory names?

I know the easiest solution is to install CodeWarrior in a directory without spaces, however this software will be built by a lot of different people and having people reinstall their toolchain is a pain for them.

Thanks,
Stuart

Outcomes