When I am compiling my program
I am getting this error
undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
It feels that it is not albe to find reference in the standard libraries or something. Is it some kind of lib conflict. Basically I am trying to port piece of code which was on GCC 3.1.1 开发者_开发知识库to 4.1.2
As there is compiler change I am facing this issue
Are you linking with other components still on 3.1.1 or even linking with the wrong GNU library?
Did you #include
all the appropriate headers for the standard library components you're using?
For example,
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
Sound to me like you are using some c++ code. 'std' namespace and the 'template'.
Try using g++ to compile your code and if that doesn´t work try to put "using namespace std;" after your include lines.
Can you please provide atleast some few lines from where the error is from?
Btw found this link with the same question asked: Here
Where they suggest installing libstdc++.
精彩评论