CSC448: Code Generation: Building an Executable [80/133] Previous pageContentsNext page

Corin did not show

After running ant test, you can build a single executable with:

LINUX
$ gcc -Wa,--gstabs asmlocal/*.s output/codegenlocal/test094.s -o output/exe/test094

WINDOWS
$ gcc -Wa,--gstabs asmlocal\*.s output\codegenlocal\test094.s -o output\exe\test094.exe

If you are not on Windows 95/98/ME, you can build all executables at once:

LINUX
$ for i in output/codegenlocal/*.s; do gcc -Wa,--gstabs asmlocal/*.s $i -o output/exe/`basename $i .s`; done

WINDOWS
> for %i in (output\codegenlocal\*.s) do @gcc -Wa,--gstabs asmlocal\*.s %i -o output\exe\%~ni

Do not worry about the single example that fails to build. It is only because there is no implementation supplied for the native methods.

Be alert for missing return statements or missing variable initializations in your COOL examples. They usually cause a crash.

Interesting programs:

Previous pageContentsNext page