I'm getting "undefined reference to `get_metadata_record_new'" right on the get_metadata_record_new(sz) in memory.c
{memory.c}
#include "metadata_record.h"
bool add_tohashtable(struct memory *mem, char *key_address, size_t sz) {
//Getting the error on this next line
struct metadata_record * metarec = get_metadata_record_new(sz);
...
}
{metatdata_record.h}
#ifndef METADATA_H_
#define METADATA_H_
struct metadata_record {
size_t size;
bool allocated;
};
struct metadata_record *get_metadata_record_new(size_t);
...
#endif /* METADATA_H_ */
I tried copying and pasting this definition from my metadata_record.c file to the top of my memory.c and the error goes away:
struct metadata_record *get_metadata_record_new(size_t sz) {
...
}