comp.lang.ada
 help / color / mirror / Atom feed
From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Linking in an externally compiled .o file with gnatmake?
Date: Mon, 11 Jun 2012 12:14:29 +0200
Date: 2012-06-11T12:14:29+02:00	[thread overview]
Message-ID: <87k3ze6tq2.fsf@adaheads.sparre-andersen.dk> (raw)
In-Reply-To: 87oboq6u3q.fsf@adaheads.sparre-andersen.dk

Jacob Sparre Andersen wrote:

> Compiling "alsa_macros.c" to "alsa_macros.o" is not a problem, but how
> can I get gnatmake to link "alsa_macros.o" into the final program?  Or
> maybe into "sound-alsa.o" as it is package Sound.ALSA which imports
> the function.

Adding "alsa_macros.o" to the linker switches does the job:

   package Linker is
      for Default_Switches ("ada") use ("-lasound", "alsa_macros.o");
   end Linker;

Thanks to tkoskine on the Ada IRC channel for a quick response.

Greetings,

Jacob
-- 
Why is it that all of the instruments seeking intelligent
life in the universe are pointed away from Earth?



      reply	other threads:[~2012-06-14 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 10:06 Linking in an externally compiled .o file with gnatmake? Jacob Sparre Andersen
2012-06-11 10:14 ` Jacob Sparre Andersen [this message]
replies disabled

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