From: Eli Z. <el...@gn...> - 2013-07-08 02:41:40
|
> Date: Sun, 7 Jul 2013 18:37:21 -0700 > From: Kirk Joppy <kir...@gm...> > > > This is the clue: > > > configure:4168: checking for Hunspell_create in -lhunspell > > configure:4193: gcc -o conftest.exe -g -O2 conftest.c -lhunspell >&5 > > g:/mingw/bin/../lib/gcc/ > > mingw32/4.7.2/../../../libhunspell.a(hunspell.o): In function > > `ZN8HunspellC2EPKcS1_S1_': > > g:\hunspell-1.3.2\msys-build\src\hunspell/../../../src/hunspell > > /hunspell.cxx:25: undefined reference to `operator new(unsigned int)' > > > All the undefined references are to C++ functions. > > How the heck do you know that? Is it something to do with the wacky names? Because 'new', 'new[]', 'delete' and 'delete[]' are C++ features. Also, the file names that have *.cxx extensions hint on that, as does '__gxx_personality_v0'. > > The problem here is that the test program is compiled as a C program, > > while Hunspell is a C++ library, and therefore needs to be compiled > > with g++, not with gcc. > > What is the difference? I thought gcc was a compiler driver that > invokes whichever compiler is appropriate. So let's see... how does it > choose the compiler... by file extension? Aha! Thanks. Exactly. If conftset.c were conftest.cpp, it would have worked. |