I'm trying to compile with z88dk a moderately large multiplatform project, where some files are generated automatically.
I have code that is similar to this one:
Code: Select all
#include<stdio.h>
int main(void)
{
printf("Hello " WORLD_NAME "\n");
return 0;
}
Code: Select all
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ gcc -DWORLD_NAME=\"Jupiter\" hello.c
$ gcc -DWORLD_NAME=\"Jupiter\" hello.c -o hello
$ ./hello
Hello Jupiter
(zcc - Frontend for the z88dk Cross-C Compiler - v16709-7140f95c5-20200720)
Code: Select all
$ zcc +zx -DWORLD_NAME=\"Jupiter\" hello.c
hello.c:5:22: error: Missing token, expecting ) got J
hello.c:5:22: fatal error: Expected ';'
Compilation aborted