malloc() mcc18
crevars said:
My picc18 it's not a demo....but I think your code could work with a demo version. Try to put stdlib.h in the directory of your simple program and put #include "stdlib.h" instead.
i have copy the stdlib.h under the project file.but it doesn't work;
some error as follow
The target "D:\picc\PIC18\fgh.obj" is already up to date.
Executing: "C:\HTSOFT\PIC18\BIN\PICC18.EXE" -E"2.lde" "D:\picc\PIC18\fgh.obj" -M"2.map" -O"2.cof" -O"2.hex" -Q -MPLAB -18F248
Error[000] : undefined symbols:
Error[000] : _free (D:\picc\PIC18\fgh.obj)
Error[000] : _malloc (D:\picc\PIC18\fgh.obj)
Error[000] D:\picc\PIC18\fgh.obj 17 : Fixup overflow in expression (loc 0x20 (0x1C+4), size 1, value 0x100)
Error[000] D:\picc\PIC18\fgh.obj 17 : Fixup overflow in expression (loc 0x22 (0x1C+6), size 1, value 0x101)
Error[000] fgh.rlf 24 : Fixup overflow in expression (loc 0x1 (0x1+0), size 1, value 0x100)
Error[000] fgh.rlf 28 : Fixup overflow in expression (loc 0x1 (0x1+0), size 1, value 0x101)
BUILD FAILED: Fri Mar 24 18:59:03 2006