Code: Select all
#include <malloc.h>
void main() {
mallinit();
}
gives this errorz88dk zcc +zalt -SO2 -clib=sdcc_iy --max-allocs-per-node200000 "c:\Users\marc\Documents\HardwareProjects\Zalt\Zalt\Source\z88dk_target\_tests\Heap\Heap_test.c" -o "c:\Users\marc\Documents\HardwareProjects\Zalt\Zalt\Source\z88dk_target\_tests\Heap\Heap_test"
and I can't figure out why.c:\Users\marc\Documents\HardwareProjects\Zalt\Zalt\Source\z88dk_target\_tests\Heap\Heap_test.c:4: warning 112: function 'mallinit' implicit declaration
c:\Users\marc\Documents\HardwareProjects\Zalt\Zalt\Source\z88dk_target\_tests\Heap\Heap_test.c:4: warning 84: 'auto' variable 'mallinit' may be used before initialization
c:\Users\marc\Documents\HardwareProjects\Zalt\Zalt\Source\z88dk_target\_tests\Heap\Heap_test.c:4: warning 84: 'auto' variable 'mallinit' may be used before initialization
Error at file 'C:\Users\marc\AppData\Local\Temp\zccD4012.asm' line 286: symbol '_mallinit' not defined
1 errors occurred during assembly
Errors in source file c:\Users\marc\Documents\HardwareProjects\Zalt\Zalt\Source\z88dk_target\_tests\Heap\Heap_test.c:
Error at file 'C:\Users\marc\AppData\Local\Temp\zccD4012.asm' line 286: symbol '_mallinit' not defined
^ ---- jp _mallinit
The "implicit declaration" warning suggests it didn't see the prototype in malloc.h - but it's in there - I checked - assuming FARDATA is not defined. I could imaging a linker error when I may not have all the libraries build but this is a compiler error.
BTW: I have not made any changes to the complete set of libraries for the zalt target (yet).
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel