xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Error loading shared libs


From: Jens Thoms Toerring
Subject: Re: [XForms] Error loading shared libs
Date: Sun, 16 Jun 2019 12:45:39 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Peter,

On Sun, Jun 16, 2019 at 04:49:59AM +0200, Peter Wiehe wrote:
> I can't get the xforms library to operate. I enter in the shell:
> 
> gcc -o gui gui.c -L/usr/local/lib -lforms -lX11
> 
> But when I run "./gui" I get the error:
> 
> ./gui: error while loading shared libraries: libforms.so.2: cannot
> open shared object file: No such file or directory
> 
> But the library file exists. What am I doing wrong?
> 
> (I use Manjaro Linux and installed the "latest stable" XForms using
> "./configure", "make", "sudo make install".)

My best guess is that you haven't told the run-time linler
about the existence of the new library. The run-time linker
has a list of directories it searches to and a list of the
libraries it has found there. If you look into your /etc/
directory you'll probably find a subdirectory named
/etc/ld.so.conf.d/. Put a file named e.g. 'local_lib.conf'
(the name actually doesn't matter) with a line containing
"/usr/local/lib/" (or wherever the library not found is)
in it. That adds that path to the list of paths the run-
time linker will check for libraries. Then just run
'ldconfig' once, which will update the run-time linkers
database of known libraries. Afterwards you should be able
to run your program.

If that doesn't help I'd recommend that you run

ldd gui

and post the resulting output - ldd tells you what libra-
ries your program is linked against and where they should
be.
                        Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]