I'm trying to program something using apstring.h and dice.h (which also includes randgen.h). I placed these and their corresponding .cpp files in my /include directory, but I'm getting the following linker errors:
c:\my documents\programs\arpg\combat.o(.text+0x4d):combat.cpp: undefined reference to `Dice::Dice(int)'
c:\my documents\programs\arpg\combat.o(.text+0x5e):combat.cpp: undefined reference to `Dice::Dice(int)'
c:\my documents\programs\arpg\combat.o(.text+0x6f):combat.cpp: undefined reference to `Dice::Dice(int)'
c:\my documents\programs\arpg\combat.o(.text+0x84):combat.cpp: undefined reference to `apstring::operator=(char const *)'
c:\my documents\programs\arpg\combat.o(.text+0x99):combat.cpp: undefined reference to `apstring::operator=(char const *)'
c:\my documents\programs\arpg\combat.o(.text+0x101):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text+0x117):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text+0x159):combat.cpp: undefined reference to `Dice::Roll(void)'
c:\my documents\programs\arpg\combat.o(.text+0x16d):combat.cpp: undefined reference to `Dice::Roll(void)'
c:\my documents\programs\arpg\combat.o(.text+0x1bd):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text+0x1e9):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text$__10characters+0x1f):combat.cpp: undefined reference to `apstring::apstring(void)'
c:\my documents\programs\arpg\combat.o(.text$__10characters+0xbf):combat.cpp: undefined reference to `apstring::~apstring(void)'
c:\my documents\programs\arpg\combat.o(.text$_$_10characters+0x15):combat.cpp: undefined reference to `apstring::~apstring(void)'
I have absolutely no idea what this implies. Does anyone know how to fix it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
these are linking errors:
your module combat, can not linked correctly, because the linker doesn't have/find the module/lib where Dice is coded.
Either Lib is missing, or compilation of Dice has failed.
Patrick
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to program something using apstring.h and dice.h (which also includes randgen.h). I placed these and their corresponding .cpp files in my /include directory, but I'm getting the following linker errors:
c:\my documents\programs\arpg\combat.o(.text+0x4d):combat.cpp: undefined reference to `Dice::Dice(int)'
c:\my documents\programs\arpg\combat.o(.text+0x5e):combat.cpp: undefined reference to `Dice::Dice(int)'
c:\my documents\programs\arpg\combat.o(.text+0x6f):combat.cpp: undefined reference to `Dice::Dice(int)'
c:\my documents\programs\arpg\combat.o(.text+0x84):combat.cpp: undefined reference to `apstring::operator=(char const *)'
c:\my documents\programs\arpg\combat.o(.text+0x99):combat.cpp: undefined reference to `apstring::operator=(char const *)'
c:\my documents\programs\arpg\combat.o(.text+0x101):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text+0x117):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text+0x159):combat.cpp: undefined reference to `Dice::Roll(void)'
c:\my documents\programs\arpg\combat.o(.text+0x16d):combat.cpp: undefined reference to `Dice::Roll(void)'
c:\my documents\programs\arpg\combat.o(.text+0x1bd):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text+0x1e9):combat.cpp: undefined reference to `operator<<(ostream &, apstring const &)'
c:\my documents\programs\arpg\combat.o(.text$__10characters+0x1f):combat.cpp: undefined reference to `apstring::apstring(void)'
c:\my documents\programs\arpg\combat.o(.text$__10characters+0xbf):combat.cpp: undefined reference to `apstring::~apstring(void)'
c:\my documents\programs\arpg\combat.o(.text$_$_10characters+0x15):combat.cpp: undefined reference to `apstring::~apstring(void)'
I have absolutely no idea what this implies. Does anyone know how to fix it?
Sorry about the double post. I should've realized when IE said that I needed to resend information that it would re-post my topic...
- Max
these are linking errors:
your module combat, can not linked correctly, because the linker doesn't have/find the module/lib where Dice is coded.
Either Lib is missing, or compilation of Dice has failed.
Patrick