Compile multiple object files

If your user-defined function or aggregate has more than one source file, you can compile the multiple sources into one object file by using a series of nzudxcompile steps. You compile the sources for the host and SPU objects in separate steps.

For example, if you have two source C++ programs that are called helloworld.cpp and parser.cpp, compile the host source files by compiling both C++ files individually, then compile them both into one output source file, as follows:
nzudxcompile --host helloworld.cpp –o helloworld_temp.o_x86
nzudxcompile --host parser.cpp –o parser.o_x86 
nzudxcompile --host --objs helloworld_temp.o_x86 --objs parser.o_x86 
    -o helloworld.o_x86
Similarly, to compile the multiple sources to create one SPU object file, use the following commands:
nzudxcompile helloworld.cpp --spu -o helloworld_temp.o_spu10
nzudxcompile parser.c --spu -o parser.o_spu10 
nzudxcompile --spu --objs helloworld_temp.o_spu10 
    --objs parser.o_spu10 -o helloworld.o_spu10