On 20010801 Gwenole Beauchesne wrote:
>On Wed, 1 Aug 2001, J . A . Magallon wrote:
>
>> Found problem with new libpspell4. It has parts in C++. So programs
>> that use only the C part (like balsa), fail to link. I had to add
>> manually -lstdc++ to build latest CVS balsa.
>
>Could you please post the complete link errors and compiler tools used
>(binutils, gcc, etc.).
>

Tools are latest in Cooker:
werewolf:~/in# rpm -q binutils gcc gcc-c++ libstdc++2.10
binutils-2.11.90.0.8-4mdk
gcc-2.96-0.60mdk
gcc-c++-2.96-0.60mdk
libstdc++2.10-2.96-0.60mdk

The link fails even when detecting libpspell in configure:
configure:8576: checking for new_pspell_manager in -lpspell
configure:8603: gcc -o conftest -pthread -O2 -march=i686  -I/usr/include/gtk-1.2
 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include  conftest.
c -lpspell  >&5
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `ios virtual table'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `ostream::flush(void)'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `filebuf::~filebuf(void)'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `istream::ios virtual table'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `ostream::operator<<(char const *)'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `__iomanip_setw(ios &, int)'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `fstreambase::fstreambase(int, char const *, int, int)'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `ifstream::ios virtual table'
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/../../../libpspell.so: undefined r
eference to `fstreambase::ios virtual table'
collect2: ld returned 1 exit status
configure: failed program was:
#line 8584 "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char new_pspell_manager ();
int
main ()
{
new_pspell_manager ();
  ;
  return 0;
}

If you use libpspell wit C++, there is no problem 'cause the linker adds the
libstdc++ lib. But if you link with C linker...

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:[EMAIL PROTECTED]
Mandrake Linux release 8.1 (Cooker) for i586
Linux werewolf 2.4.7-ac3 #1 SMP Mon Jul 30 16:39:36 CEST 2001 i686

Reply via email to