kerden
Junior Member level 3
pic malloc
I have writed a simple program like this:
/* ******************************* */
#include<stdlib.h>
void main(void)
{
unsigned char *ptr;
ptr = (unsigned char *) malloc(sizeof(unsigned char));
free(ptr);
}
/* ***************************** */
This just used to test how to use malloc() and free() in PICC.But after compiled,some error message appear:
Error[000] : undefined symbols:
Error[000] : _free (D:\MPLAB IDE\PICproject\Test\test.obj)
Error[000] : _malloc (D:\MPLAB IDE\PICproject\Test\test.obj)
I have doubt in why these error message appear.How to do dynamic memory's program such use malloc() and free() in PICC?
Best regards,
I have writed a simple program like this:
/* ******************************* */
#include<stdlib.h>
void main(void)
{
unsigned char *ptr;
ptr = (unsigned char *) malloc(sizeof(unsigned char));
free(ptr);
}
/* ***************************** */
This just used to test how to use malloc() and free() in PICC.But after compiled,some error message appear:
Error[000] : undefined symbols:
Error[000] : _free (D:\MPLAB IDE\PICproject\Test\test.obj)
Error[000] : _malloc (D:\MPLAB IDE\PICproject\Test\test.obj)
I have doubt in why these error message appear.How to do dynamic memory's program such use malloc() and free() in PICC?
Best regards,