Re: libstdc++, yahoo/misc failing to load

Meredydd <[email protected]> Thu, 10 Jun 2004 09:43:33 +0100
Newsgroups gmane.network.everybuddy.devel
Message-ID <[email protected]>
On Thursday 10 June 2004 03:15, Rodney Dawes wrote:
> On M=C3=ABr , 2004-06-09 at 17:08 +0100, Meredydd wrote:
> > Hey there,
> > 	On shell.lazzurs.net, the machine which runs the hosted cores, I'm
> > having two problems building/starting eb-lite.
> >
> > 	The first is a random "symbol not found" error when loading the
> > MSN module - this was fixed by manually relinking the binary with
> > -lstdc++. Shouldn't detection of machines which need this, and
> > appropriate modification of the Makefiles, be in autoconf? Rodney,
> > what can you do with this?
>
> Ok. I can't make this happen in my build. How exactly is the build
> configured where this is a problem?

Standard ./gen && make && make install. It doesn't happen on my machine=20
with the same configuration - I think it's certain system=20
configurations that require this...I seem to remember it being=20
something to do with gcc version (works on 3.2, nonworking machine's=20
3.3...hmm, maybe not). The nonworking one's Debian testing, working is=20
Slack 9.1. I'm not sure I can help further...

I don't know how you're intending to test for this, but if it's by means=20
of compiling a test program and seeing whether it works (isn't this=20
how ./configure usually works?), the following should do the trick:

#include <stdio.h>

class testclass
{
  public:
  void blah(void) { printf("Working\n"); return; }
}

int main(int argc, char ** argv)
{
  testclass * tc=3Dnew testclass;
  tc->blah();
  delete tc;

  return 0;
}

If the above program compiles and runs fine with just a standard compile=20
(gcc -o testing testing.C), you're fine, if you need -lstdc++ on that=20
command line for it to work, you're not.

One other change which I know works is to invoke the C++ compiler=20
explicitly (g++ or c++ instead of gcc or cc, respectively) in the link=20
step - that automatically links with the C++ libraries, whatever they=20
are.

Meredydd