bgslibrary icon indicating copy to clipboard operation
bgslibrary copied to clipboard

QT Creator Amber.o multiply definition.

Open MyraBaba opened this issue 7 years ago • 2 comments

Hi,

When I try to compile through Qt Creator I have below Error:

amber.o: In function bgslibrary::algorithms::Amber::saveConfig()': Amber.cpp:(.text+0x0): multiple definition of bgslibrary::algorithms::Amber::saveConfig()' Amber.o:Amber.cpp:(.text+0x0): first defined here amber.o: In function bgslibrary::algorithms::Amber::loadConfig()': Amber.cpp:(.text+0x70): multiple definition of bgslibrary::algorithms::Amber::loadConfig()' Amber.o:Amber.cpp:(.text+0x70): first defined here amber.o: In function bgslibrary::algorithms::Amber::~Amber()': Makefile:659: recipe for target 'GUI' failed Amber.cpp:(.text+0x110): multiple definition of bgslibrary::algorithms::Amber::~Amber()' Amber.o:Amber.cpp:(.text+0x110): first defined here amber.o: In function bgslibrary::algorithms::Amber::~Amber()': Amber.cpp:(.text+0x110): multiple definition of bgslibrary::algorithms::Amber::~Amber()' Amber.o:Amber.cpp:(.text+0x110): first defined here amber.o: In function bgslibrary::algorithms::Amber::~Amber()': Amber.cpp:(.text+0x330): multiple definition of bgslibrary::algorithms::Amber::~Amber()' Amber.o:Amber.cpp:(.text+0x330): first defined here amber.o: In function bgslibrary::algorithms::Amber::process(cv::Mat const&, cv::Mat&, cv::Mat&)': Amber.cpp:(.text+0x350): multiple definition of bgslibrary::algorithms::Amber::process(cv::Mat const&, cv::Mat&, cv::Mat&)' Amber.o:Amber.cpp:(.text+0x350): first defined here amber.o: In function bgslibrary::algorithms::Amber::Amber()': Amber.cpp:(.text+0x5d0): multiple definition of bgslibrary::algorithms::Amber::Amber()' Amber.o:Amber.cpp:(.text+0x5d0): first defined here amber.o: In function bgslibrary::algorithms::Amber::Amber()': Amber.cpp:(.text+0x5d0): multiple definition of bgslibrary::algorithms::Amber::Amber()' Amber.o:Amber.cpp:(.text+0x5d0): first defined here mainwindow.o: In function bgslibrary::algorithms::IBGS* bgslibrary::createInstancebgslibrary::algorithms::CodeBook()': mainwindow.cpp:(.text._ZN10bgslibrary14createInstanceINS_10algorithms8CodeBookEEEPNS1_4IBGSEv[_ZN10bgslibrary14createInstanceINS_10algorithms8CodeBookEEEPNS1_4IBGSEv]+0x17): undefined reference to bgslibrary::algorithms::CodeBook::CodeBook()' Amber.o: In function bgslibrary::algorithms::Amber::~Amber()': Amber.cpp:(.text+0x183): undefined reference to libamberModelFree' Amber.o: In function bgslibrary::algorithms::Amber::process(cv::Mat const&, cv::Mat&, cv::Mat&)': Amber.cpp:(.text+0x44e): undefined reference to libamberGetSegmentation_8u_C3R' Amber.cpp:(.text+0x575): undefined reference to libamberModelAllocInit_8u_C3R' Amber.o: In function bgslibrary::algorithms::Amber::Amber()': Amber.cpp:(.text+0x764): undefined reference to libamberModelNew' amber.o: In function bgslibrary::algorithms::Amber::~Amber()': Amber.cpp:(.text+0x183): undefined reference to libamberModelFree' amber.o: In function bgslibrary::algorithms::Amber::process(cv::Mat const&, cv::Mat&, cv::Mat&)': Amber.cpp:(.text+0x44e): undefined reference to libamberGetSegmentation_8u_C3R' Amber.cpp:(.text+0x575): undefined reference to libamberModelAllocInit_8u_C3R' amber.o: In function bgslibrary::algorithms::Amber::Amber()': Amber.cpp:(.text+0x764): undefined reference to libamberModelNew' collect2: error: ld returned 1 exit status make: *** [saftas_gui] Error 1 11:48:11: The process "/usr/bin/make" exited with code 2. Error while building/deploying project bgslibrary_gui (kit: Desktop Qt 5.10.0 GCC 64bit) When executing step "Make"

MyraBaba avatar Jan 17 '18 16:01 MyraBaba

Hi @MyraBaba ! thank you for reporting this issue. I will check this.

andrewssobral avatar Jan 28 '18 12:01 andrewssobral

Hi @MyraBaba, I am sorry for my long feedback (very limited time), I think this issue was fixed in the commit https://github.com/andrewssobral/bgslibrary/commit/1124e52228af6cdcd7a8b5f0e17809af74b49d40 I added CodeBook files in the project file (*.pro): https://github.com/andrewssobral/bgslibrary/blob/master/gui_qt/bgslibrary_gui.pro

andrewssobral avatar Sep 12 '18 12:09 andrewssobral