I am trying to write a program that simulates 6 different page replacement algorithms. The program is written in C++ on a Windows XP machine under Visual Studio .NET 2003. I am trying to port the program over to linux, but I am running into a problem. At this moment I am only trying to only compile main and my class that runs the fifo algorithm. I have another class which reprseents the page references as they come in. In my makefile I compile all of these files and try to create an executable. If I type make in the terminal then I get the following errors:
g++ -c PageReference.cpp
g++ -c FIFOPageReplacement.cpp
g++ -c main.cpp
g++ -o pagerefsim main.o
main.o(.text+0x99): In function `main':
: undefined reference to `FIFOPageReplacement::FIFOPageReplacement[in-charge](int)'
main.o(.text+0x140): In function `main':
: undefined reference to `PageReference::PageReference[in-charge](int, char)'
main.o(.text+0x1a3): In function `main':
: undefined reference to `FIFOPageReplacement::add(PageReference*)'
main.o(.text+0x1ba): In function `main':
: undefined reference to `FIFOPageReplacement::run()'
main.o(.text+0x1d3): In function `main':
: undefined reference to `FIFOPageReplacement:
rint(std::basic_ofstream<char, std::char_traits<char> >&)'
collect2: ld returned 1 exit status
make: *** [pagerefsim] Error 1
Does anyone have any idea how to fix this problem?
Thanks.