comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: file list in a directory
Date: Fri, 16 Mar 2001 18:53:18 -0600
Date: 2001-03-16T18:53:18-06:00	[thread overview]
Message-ID: <jAys6.5558$25.2382331@newsrump.sjc.telocity.net> (raw)
In-Reply-To: mailman.984777550.11120.comp.lang.ada@ada.eu.org

You have to tell the linker in which library unit to find the missing
functions.  This is done (for example) by adding
-largs -L <library-directory> -l<abbreviated-library-file-name>
where the abbreviated <library-file-name> is formed by removing
"lib" from the beginning of the full file name, and removing
".a" from the end of the full file name.

"EtienneB" <etienne.baudin@wanadoo.fr> wrote in message
news:mailman.984777550.11120.comp.lang.ada@ada.eu.org...
> So, I tryed quickly to do it interfacing with but the linker did't agree
>
> ./test_rep.o(.text+0x3e):test_rep.adb: undefined reference to `_opendir'
> ./test_rep.o(.text+0x4f):test_rep.adb: undefined reference to `readDir'
> ./test_rep.o(.text+0x60):test_rep.adb: undefined reference to `closeDir'
> gnatmake: *** link failed.
>
> look at the imports
>    function openDir (szPath : chars_ptr) return dir_access;
>    pragma import (C, openDir, "_opendir");
>    function closeDir (Dir : dir_access) return integer;
>    pragma import (C, closeDir, "closeDir");
>    function readDir (Dir : dir_access) return dirent_access;
>    pragma import (C, readDir, "readDir");
>
> Thanks
> Etienne Baudin
>
>




  reply	other threads:[~2001-03-17  0:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-16 18:19 file list in a directory EtienneB
2001-03-16 18:31 ` Pascal Obry
2001-03-16 20:12   ` Robert A Duff
2001-03-17 10:09     ` Pascal Obry
2001-03-17 17:45     ` Nick Roberts
2001-03-17 18:08       ` Randy Brukardt
2001-03-17 19:57       ` Georg Bauhaus
2001-03-19 10:46       ` Jean-Pierre Rosen
2001-04-08  3:18         ` srini
2001-04-09  9:34           ` Jean-Pierre Rosen
2001-03-16 19:07 ` tmoran
2001-03-16 21:19   ` EtienneB
2001-03-17  0:53     ` David C. Hoos, Sr. [this message]
2001-03-17  2:50     ` DuckE
2001-03-17 12:30       ` Staffan Dittmer
2001-03-17 10:10     ` Pascal Obry
2001-03-16 21:19 ` EtienneB
2001-03-19  9:23 ` Martin Dowie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox