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,FREEMAIL_FROM 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!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: Example Ada calling Gnu Scientific Library (GSL) Date: Tue, 11 Apr 2017 19:31:38 +0200 Message-ID: References: <2b035819-e55e-4805-9ff1-a2cec09f13e0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net ch1oS07thp1Hfa70TSUctAw4KB5kmUXcMoR3RSvXgJvBUKyOae Cancel-Lock: sha1:sYOyUWABq0UhPulmKSf0d0wdYq8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:46572 Date: 2017-04-11T19:31:38+02:00 List-Id: On 04/10/2017 05:44 PM, Simon Wright wrote: > Oops, thanks Dmitry: I should have said > > package Linker is > for Linker_Options use ("-lgsl"); > end Linker; > > (in your lowest-level GPR, gsl_raw I think?) > FINALLY! I had to add "-L/usr/lib"!. This provoked a series of other link errors showing that "-lgslcblas" is needed too. Now for completeness and perhaps as help for others, my 3 project files are: 1. Thin binding: library project GSL_Raw is for Source_Dirs use ("src"); for Library_Dir use "lib"; for Object_Dir use "obj"; for Library_Name use "gsl_raw"; for Library_Kind use "static"; for Externally_Built use "false"; end GSL_Raw; 2. Thick binding: with "GSL_Raw/gsl_raw"; library project GSL is for Source_Dirs use ("src"); for Library_Name use "gsl"; for Library_Dir use "lib"; for Object_Dir use "obj"; for Library_Interface use ("gsl"); for library_kind use "static"; for externally_built use "false"; package Compiler is for Default_Switches ("Ada") use ("-g", "-gnat05"); end Compiler; package Linker is for Linker_Options use ("-L/usr/lib", "-lgslcblas", "-lgsl"); end Linker; end GSL; 3. Test program with "../../gsl.gpr"; with "../../../Gen/gen.gpr"; --<-- a libray I use in my program project Test_Integration is for Source_Dirs use ("."); for Object_Dir use "../obj"; for Exec_Dir use "."; for Main use ("test_integration.adb"); package Compiler is for Default_Switches ("ada") use ("-g", "-gnat05"); end Compiler; end Test_Integration; Thanks to all for your help, and specially to Simon for his patience. -- Frank Hrebabetzky +49 / 6355 / 989 5070