comp.lang.ada
 help / color / mirror / Atom feed
* Using shared libraries
@ 2009-07-10 21:03 Tomek Walkuski
  2009-07-10 21:31 ` Hibou57 (Yannick Duchêne)
  2009-07-11  8:48 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 4+ messages in thread
From: Tomek Walkuski @ 2009-07-10 21:03 UTC (permalink / raw)


I suppose it is easy (and dumb, again) question.

I have built library (let's call it "foo") using project files. I have
"libfoo.so" and some *.ali files in /lib dir.

I have created another project (different directory and so on), called
"bar", and I want to use "foo" library.

What is needed? Put libfoo.so somewhere and set Linker_Options
properly? Or maybe sources are needed to compile "bar" project?

I'm green.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using shared libraries
  2009-07-10 21:03 Using shared libraries Tomek Walkuski
@ 2009-07-10 21:31 ` Hibou57 (Yannick Duchêne)
  2009-07-11  7:47   ` Tomek Wałkuski
  2009-07-11  8:48 ` Dmitry A. Kazakov
  1 sibling, 1 reply; 4+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2009-07-10 21:31 UTC (permalink / raw)


Ada compilers needs specifications to use a packages. So I suppose at
least the specification files should shipped in one of the compiler
include search paths.

If you are using GNAT, you may try to simply import the library
project from the application project which needs the library
(providing you've built the library with a library project). To do so,
either addd “ with "librarypath/mylibrary.gpr " ” at the start of your
application project file, or else, from GPS, add a dependency to the
library project in the application project dependencies.

Greatings



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using shared libraries
  2009-07-10 21:31 ` Hibou57 (Yannick Duchêne)
@ 2009-07-11  7:47   ` Tomek Wałkuski
  0 siblings, 0 replies; 4+ messages in thread
From: Tomek Wałkuski @ 2009-07-11  7:47 UTC (permalink / raw)


Ok, simply "with'ing" library project file works.

Now... how to force that "bar" project which uses "foo" library had to
use libfoo.so ? In other words, that libfoo.so had to be in library
path in order "bar" to work.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using shared libraries
  2009-07-10 21:03 Using shared libraries Tomek Walkuski
  2009-07-10 21:31 ` Hibou57 (Yannick Duchêne)
@ 2009-07-11  8:48 ` Dmitry A. Kazakov
  1 sibling, 0 replies; 4+ messages in thread
From: Dmitry A. Kazakov @ 2009-07-11  8:48 UTC (permalink / raw)


On Fri, 10 Jul 2009 14:03:09 -0700 (PDT), Tomek Walkuski wrote:

> I suppose it is easy (and dumb, again) question.
> 
> I have built library (let's call it "foo") using project files. I have
> "libfoo.so" and some *.ali files in /lib dir.
>
> I have created another project (different directory and so on), called
> "bar", and I want to use "foo" library.
> 
> What is needed? Put libfoo.so somewhere and set Linker_Options
> properly? Or maybe sources are needed to compile "bar" project?

Here is a mall program that helps installation of custom libraries into
GPS:

   http://www.dmitry-kazakov.de/ada/gps_installer.htm

It also describes a bit where to place which files.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-11  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 21:03 Using shared libraries Tomek Walkuski
2009-07-10 21:31 ` Hibou57 (Yannick Duchêne)
2009-07-11  7:47   ` Tomek Wałkuski
2009-07-11  8:48 ` Dmitry A. Kazakov

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