Using the 'calc' example:
If I compile/link calc.c using (gcc cross-compiler for win32)
mingw32-gcc on FreeBSD:
mingw32-gcc -I/usr/local/lib/pl-5.4.7/include -o calc calc.c
/usr/local/lib/pl-5.4.7/lib/i386-mingw32/libpl.lib
I get 'calc' - which is a win32 executable - minus prolog resources
So I use qsave_image to get a resource:
pl -f none -F none -g true -t
"consult(['calc.pl']),qsave_program('pl-image',[goal=true,toplevel=prolog,initfile=none,emulator='plcon.exe'])"
which compiles calc.pl and generates a 'resource' but with the win32
emulator instead of the running unix emulator.
If I then concatenate the two:
cat pl-image >> calc
The resulting executable generates an error:
"ERROR:"
Why won't this approach work?
Many thanks
|