Re: Debian Sarge: problem with libgnat.so



Ludovic Brenta <ludovic@xxxxxxxxxxxxxxxxxx> wrote:

> Your Makefile is correct, except that it calls the C compiler to link
> your program. If you call gnatgcc instead, you should be fine. By
> default, gnatgcc looks in /usr/lib/gcc-lib/i486-linux/2.8.1/adalib,
> but gcc (the C compiler) only looks in /usr/lib.

Hm, gnatgcc gives the same error:

gnatgcc -Wall -o test_c test_c.c -I/usr/local/include/opensteuer -lopensteuer -lgnat
ld: cannot find -lgnat

martinkl [~/src/eigene/ada/opensteuer/libopensteuer] ls -l `locate libgnat.so`
lrwxrwxrwx 1 root root 33 2005-12-22 18:55 /usr/lib/gcc-lib/i486-linux/2.8.1/adalib/libgnat.so -> ../../../../libgnat-3.15p.so.1.12

martinkl [~/src/eigene/ada/opensteuer/libopensteuer] env | grep ADA
ADA_INCLUDE_PATH=/usr/lib/ada/adalib:/usr/lib/ada/adainclude:/usr/lib/gcc-lib/i486-linux/2.8.1/adalib:/home/martinkl/lib/ada/av/1

martinkl [~/src/eigene/ada/opensteuer/libopensteuer] cat /etc/ld.so.conf | grep /usr/lib
/usr/lib/libc5-compat
/usr/lib
/usr/lib/gcc-lib/i486-linux/2.8.1/adalib

Is there anything else I need to configure?

> Adding another symlink in /usr/lib is also an option.

I want to keep it portable with other Linux-distros (if possible) as
the code is public. Would it be better to use gnatgcc oder gcc then?

thx, Martin
.



Relevant Pages

  • Re: Debian Sarge: problem with libgnat.so
    ... >>> Your Makefile is correct, except that it calls the C compiler to link ... If you call gnatgcc instead, ... I notice that Ubuntu doesn't have the linker problem shown, ...
    (comp.lang.ada)
  • Re: Debian Sarge: problem with libgnat.so
    ... >> Your Makefile is correct, except that it calls the C compiler to link ... If you call gnatgcc instead, ... I suggest that you hide libgnat from C programmers. ... the only standard layout for Ada files is the GNU ...
    (comp.lang.ada)