Ethereal-users: Re: [Ethereal-users] problem running ethereal from solaris.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 18 Jun 2003 11:24:37 -0700
On Wed, Jun 18, 2003 at 02:09:07PM -0400, Higgins, Read wrote:
> So, if I run /usr/ccs/bin/ld -L /usr/local/lib/libgdk-1.2.so.0, you would
> think that it would work.

You might, but I wouldn't, because the "-L" flag doesn't take, as an
argument, the pathname of a shared library, it takes, as an argument,
the pathname of a directory *containing* a library or libraries.

The exact command you specified also wouldn't work because it's not
giving the pathnames of any files to link in, it's just giving an
argument to the "-L" flag.

Furthermore, running "ld" directly won't include the C startup code; you
should use "gcc" or "cc", depending on whether you used GCC or Sun C to
compile, not "ld", to link C programs.

> If I do
> it without the flag '-L", it gives me:
> 
>  /usr/ccs/bin/ld  /usr/local/lib/libgdk-1.2.so.0 
> ld: fatal: file /usr/local/lib/libgdk-1.2.so.0: open failed: No such file or
> directory

That's trying to link the file "/usr/local/lib/libgdk-1.2.so.0" to
produce an "a.out" ELF executable image; if there isn't a file whose
pathname is "/usr/local/lib/libgdk-1.2.so.0", that won't work (and even
if there is, it won't work either - you need some object files to link
in).

> This is annoying.  Could someone please help?

As you've addressed your question to "someone", rather than to me, I'm
CCing "ethereal-users" on this.