I am trying to compile the following program in windows but I get an error which I do not understand. I have added the correct libraries and header files, yet I get this error. I am using this lcc win32 compiler.
#include <stdio.h>
#include <ctype.h>
#include "genlib.h"
#include "stack.h"
int main()
{
stackADT operandStack;
operandStack = NewStack();
return 0;
}
stack.obj .text: undefined reference to '_GetBlock'
stack.obj .text: undefined reference to '_FreeBlock'
stack.obj .text: undefined reference to '_Error'
Any help appreciated,
Ted
These are not compiler errors but linker errors. You need to link your program with the library or obj files that contain
GetBlock()etc.