I'm trying to make some float/double operations and later some cos()/sin() calls. I'm working on a CPC with all ROMs disabled, so no firmware call can be made. I guess i have to use the gen_math library but can't manage to make it work (linking errors?, see below), even with this simple piece of code :
Code: Select all
#pragma -zorg=16384
#include "math.h"
double y;
void main() {
y = 13.2;
while(1);
}
zcc.exe" +cpc -lcpcfs -lgen_math -create-app -o3 -o out.bin main.c
zcc.exe" +cpc -lcpcfs -lmz -create-app -o3 -o out.bin main.c
zcc.exe" +cpc -lcpcfs -lm -create-app -o3 -o out.bin main.c
But the best i get are those error traces :
And a lot more...File 'D:\Dev\ade\ade_ws\..\z88dk\lib\clibs\gen_math.lib', Module 'INIT_FLOATPACK', Symbol not defined
Error in expression DEG
File 'D:\Dev\ade\ade_ws\..\z88dk\lib\clibs\gen_math.lib', Module 'INIT_FLOATPACK', Symbol not defined
Error in expression PI
File 'D:\Dev\ade\ade_ws\..\z88dk\lib\clibs\gen_math.lib', Module 'INIT_FLOATPACK', Symbol not defined
Error in expression POW10
File 'D:\Dev\ade\ade_ws\..\z88dk\lib\clibs\gen_math.lib', Module 'INIT_FLOATPACK', Symbol not defined
Error in expression RAD
File 'D:\Dev\ade\ade_ws\..\z88dk\lib\clibs\gen_math.lib', Module 'INIT_FLOATPACK', Symbol not defined
Error in expression ATANC+1
File 'D:\Dev\ade\ade_ws\..\z88dk\lib\clibs\gen_math.lib', Module 'INIT_FLOATPACK', Symbol not defined
Error in expression COSC+1
I'm nearly sure it's only a problem of zcc library argument but i tried a lot of combination with no positive result. So, help or hints will be appreciated.
Thanks,
Laurent "Kyrio" K.