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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Example Ada calling Gnu Scientific Library (GSL) Date: Wed, 05 Apr 2017 17:29:29 +0100 Organization: A noiseless patient Spider Message-ID: References: <2b035819-e55e-4805-9ff1-a2cec09f13e0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="5890b73e7b0f7c27679fa3f3e90302d3"; logging-data="15150"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pPvNN0l315fQrxaH2h0pr31R88+lzTmo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:1AdBXSZn1HPAM7m47QCswADHiAY= sha1:txAzd6HU0NVrt6uHnQys5ZsXrNA= Xref: news.eternal-september.org comp.lang.ada:46530 Date: 2017-04-05T17:29:29+01:00 List-Id: hreba writes: > Ok, I did this and now I am struggling with the project files. The > first one handles the thin binding: > > library project GSL_Raw is > for Source_Dirs use ("src"); > for Library_Dir use "."; > for Library_Name use "gsl_raw"; > for Library_Kind use "static"; > for Externally_Built use "true"; > end GSL_Raw; > > Directory src contains the output from g++ -c -fdump-ada-spec -C... > There is another directory, obj, which holds the result from > gcc -c -gnat05 ../src/*.ads. Try library project GSL_Raw is for Source_Dirs use ("src"); for Library_Dir use "lib"; -- keeps .ali, libgsl_raw.a out of the way for Object_Dir use "obj"; -- for .ali, .o intermediate products for Library_Name use "gsl_raw"; for Library_Kind use "static"; for Externally_Built use "false"; -- you need to build it end GSL_Raw; and build with "gprbuild -p -P gsl_raw" - "-p" creates necessary directories. Result is .ali, libgsl_raw.a in lib/. Don't use "externally_built" at this early stage. > Then there is the project of the thick binding in another directory: > > with "GSL_Raw/gsl_raw"; > library project GSL is > for Source_Dirs use ("src"); > for Library_Name use "gsl"; > for Library_Dir use "."; again, I'd use "lib"