I am having trouble implementing a gtkmm application\'s makefile. I have implemented a simple solution, however, I am getting the following error:
g++ -Wall
I had the same issue, in my case the problem was writing gcc instead of g++
I had a similar problem when compiling zeromq (zmq) into my project. Adding -lstdc++ to the link line in my makefile solved the problem.
I met the same issue when built openCV libraries
$ gcc DisplayImage.cpp `pkg-config opencv --libs --cflags` -o DisplayImage
/usr/bin/ld: /tmp/ccbyJ7Ms.o: undefined reference to symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@@GLIBCXX_3.4.21'
//usr/lib/i386-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[SOLVE]
For gcc try adding -lstdc++
to your command.
$ gcc DisplayImage.cpp `pkg-config opencv --libs --cflags` -o DisplayImage -lstdc++
For g++ it will link libstdc.so.6++ automatically
$ g++ DisplayImage.cpp `pkg-config opencv --libs --cflags` -o DisplayImage
I had same problem it was solved by addiing -lstdc++ in command line.