Makefile linking problem


#1

Hi, two days ago I updated my os to ubuntu 16.04 and now when i run the autogenerated makefile of my program i have “undefined reference” linking problem with the function
juce::String::String(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
and other juce::String functions.
before the update everything worked good.
what can be changed and what can i do?

thank you for attention


#2

Hi maremma55,

Could you please post the whole linking error message?


#3
diego@diego-W230SD:~/Documenti/serale/project/NewProject/Builds/LinuxMakefile$ make
Linking slot_timing
build/intermediate/Debug/photogateManager_8030b959.o: In function `photogateManager::connect()':
/home/diego/Documenti/serale/project/NewProject/Builds/LinuxMakefile/../../Source/photogateManager.cpp:26: undefined reference to `juce::String::toStdString[abi:cxx11]() const'
build/intermediate/Debug/photogateManager_8030b959.o: In function `photogateManager::setPhotogate[abi:cxx11]()':
/home/diego/Documenti/serale/project/NewProject/Builds/LinuxMakefile/../../Source/photogateManager.cpp:37: undefined reference to `juce::String::String(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/diego/Documenti/serale/project/NewProject/Builds/LinuxMakefile/../../Source/photogateManager.cpp:38: undefined reference to `juce::String::String(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
Makefile:78: recipe for target 'build/NewProject' failed
make: *** [build/NewProject] Error 1

#4

This looks like your Ubuntu upgrade has also updated your compiler. I would recommend deleting all build products and any libraries you are linking against, and recompiling them all from scratch.