From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6a356a10755b8524,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.154.133 with SMTP id o5mr413079bkw.0.1339694735245; Thu, 14 Jun 2012 10:25:35 -0700 (PDT) Path: e27ni48049bkw.0!nntp.google.com!news1.google.com!news3.google.com!news2.google.com!news.glorb.com!feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Linking in an externally compiled .o file with gnatmake? Date: Mon, 11 Jun 2012 12:06:17 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87oboq6u3q.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: 95.209.226.129.bredband.3.dk Mime-Version: 1.0 X-Trace: munin.nbi.dk 1339409177 1518 95.209.226.129 (11 Jun 2012 10:06:17 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 11 Jun 2012 10:06:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:o/iuzYyKuMpx9QD4Ab18iFedVFQ= Content-Type: text/plain; charset=us-ascii Date: 2012-06-11T12:06:17+02:00 List-Id: I'm working on a binding to the Linux sound API ALSA (http://repositories.jacob-sparre.dk/alsa-binding). As a part of the binding, I need to access a C macro. I do that by turning the macro into a C function: % cat alsa_macros.c #include void allocate_alsa_hardware_parameters (snd_pcm_hw_params_t **hwparams_ptr) { snd_pcm_hw_params_alloca (hwparams_ptr); }; % 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. Greetings, Jacob -- "Facts are stubborn, but statistics are more pliable." -- Mark Twain