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.szaf.org!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: Fri, 7 Apr 2017 20:45:22 +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 R98DoeMDVtWmx0NoALD7iQgwFeOgnVcMOVGD5j3QjyT62Tk6/R Cancel-Lock: sha1:ty+LrXNZPKeSD9Xdit6IvnZ2IdI= 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:46540 Date: 2017-04-07T20:45:22+02:00 List-Id: On 04/06/2017 09:30 AM, Simon Wright wrote: > hreba writes: > >> 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? > > Hard to say, but running nm on gsl_gsl_integration_h.o might give a > clue. Most likely, I guess, is that that file contains the corresponding > symbol but decorated with a prefix derived from the package name? e.g. > gsl_gsl_integration_h__gsl_integration_qng > Nothing similar: frank@pc-frank ~/Lib/Ada/Num/GSL_Raw/obj $ nm gsl_gsl_integration_h.o 0000000000000000 D gsl_gsl_integration_h_E 0000000000000124 T gsl_gsl_integration_h__gsl_integration_cquad_ivalIP 000000000000012e T gsl_gsl_integration_h__gsl_integration_cquad_workspaceIP 00000000000000d2 T gsl_gsl_integration_h__gsl_integration_glfixed_tableIP 0000000000000020 R gsl_gsl_integration_h__gsl_integration_qawo_enumN 0000000000000000 R gsl_gsl_integration_h__gsl_integration_qawo_enumS 00000000000000bc T gsl_gsl_integration_h__gsl_integration_qawo_tableIP 00000000000000b2 T gsl_gsl_integration_h__gsl_integration_qaws_tableIP 0000000000000000 T gsl_gsl_integration_h__gsl_integration_workspaceIP 00000000000000f4 T gsl_gsl_integration_h__Tgsl_integration_cquad_ival_c_arrayBIP 000000000000010c T gsl_gsl_integration_h__Tgsl_integration_cquad_ival_fx_arrayBIP 0000000000000082 T gsl_gsl_integration_h__Tgsl_integration_qaws_table_rg_arrayBIP 000000000000009a T gsl_gsl_integration_h__Tgsl_integration_qaws_table_rh_arrayBIP 0000000000000052 T gsl_gsl_integration_h__Tgsl_integration_qaws_table_ri_arrayBIP 000000000000006a T gsl_gsl_integration_h__Tgsl_integration_qaws_table_rj_arrayBIP The missing function is declared in src/gsl_gsl_integration_h.ads as function gsl_integration_qng (f : access constant gsl_gsl_math_h.gsl_function; a : double; b : double; epsabs : double; epsrel : double; result : access double; abserr : access double; neval : access stddef_h.size_t) return int; pragma Import (C, gsl_integration_qng, "gsl_integration_qng"); So what would be the next search step? -- Frank Hrebabetzky +49 / 6355 / 989 5070