From: Oscar F. <of...@wa...> - 2005-01-21 04:40:38
|
Naiqi Weng <nik...@ya...> writes: > Hi, everyone, I am a new user here! > > I wrote three C++ files using STL. > I have included <math.h>,<winsock2.h> in my file, so the link > options is like".....-lm -lws2_32 -lstdc++ >"When I tried to compile it in Mingw, there is an error message in >linking: > ".......breveViconRTClient.cpp:undefined reference to > 'std_::default_alloc_template<true,0>::deallocate(void*,unsigned)'...." > and a bunch of error messages similar to that. -lm is not needed and -lstdc++ is automatically added by g++. So remove that libraries from your command line. And be sure you use g++ for compiling and linking C++ programs. It the problem persists, reduce your program to a minimal test case that reproduces the problem and post it here, plus the commands and tool versions you are using. -- Oscar |