I'm attempting to test a FIFO/LIFO sorting program, but I keep getting this error that stumps me. I've tried looking it up, but none of the answers seem to fit my situation.
InventoryManager.o:InventoryManager.cpp:(.text+0x2e): undefined reference to `Widget::Widget(double)'
InventoryManager.o:InventoryManager.cpp:(.text+0x52): undefined reference to `Widget::Widget(double)'
InventoryManager.o:InventoryManager.cpp:(.text+0x273): undefined reference to `Widget::Widget(double)'
InventoryManager.o:InventoryManager.cpp:(.text+0x3c9): undefined reference to `Widget::Widget(double)'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: InventoryManager.o: bad reloc address 0x2c in section `.text$_ZN10StackDequeI6WidgetEC1Ev[__ZN10StackDequeI6WidgetEC1Ev]'
collect2.exe: error: ld returned 1 exit status
'InventoryManager.exe' is not recognized as an internal or external command,
operable program or batch file.
The linker is looking for the object code that implements the following constructor function:
Widget::Widget(double);
The linker cannot find that function. I see that you are linking against Widget.o , so on the assumption that the function should be coming from there, I'm guessing that the function simply doesn't exist.