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!news.swapon.de!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: Wed, 5 Apr 2017 22:21:59 +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 9Rnv+jvTvso+4Qq8snprkwVgkA2JKBAvfDvApY6G7ydsKuy3Kq Cancel-Lock: sha1:QNFXtpp51PsoktCzbc8WF50xmtg= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:46535 Date: 2017-04-05T22:21:59+02:00 List-Id: On 04/05/2017 06:29 PM, Simon Wright wrote: > > 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" > Did as you suggested. gprbuild on gsl_raw worked fine. But when I tried to build the test program with: with "../../gsl.gpr"; with "../../../Gen/gen.gpr"; 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; the output was: gprlib gsl.lexch gnatbind -n -o b__gsl.adb -Lgsl -a /home/frank/Lib/Ada/Num/obj/gsl.ali gcc -c -x ada -gnatA -gnatws b__gsl.adb -o b__gsl.o ... gcc -nostdlib -Wl,-r -o p__gsl_0.o ... ar cr /home/frank/Lib/Ada/Num/lib/libgsl.a p__gsl_0.o ranlib libgsl.a gprbind test_integration.bexch gnatbind test_integration.ali gcc -c b__test_integration.adb gcc test_integration.o -o test_integration /home/frank/Lib/Ada/Num/Tests/obj/integ_aux.o: In function `integ_aux__gsl_test__integration_qng': /home/frank/Lib/Ada/Num/src/gsl.adb:54: undefined reference to `gsl_integration_qng' collect2: error: ld returned 1 exit status gprbuild: link of test_integration.adb failed But in GSL_Raw/src/gsl_gsl_integration_h.ads the procedure gsl_integration_qng _is_ declared. Where might it have gone lost? -- Frank Hrebabetzky +49 / 6355 / 989 5070