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!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 25 May 2018 10:35:21 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: undefined reference while calling an imported c function as procedure in ada Date: Fri, 25 May 2018 11:35:21 -0400 Organization: IISS Elusive Unicorn Message-ID: References: User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.179.115 X-Trace: sv3-KsbzpYOVEXZ9J9gDxFzokz8KwcaDwHYN8ICMCAwOCCm/ZQZwnZSKKDKOEoZbnPmzrX68fP8LvXk2evr!jAcHc6Hh6B7mRxwddefbBqzpYu2MFiZag7GFUOpdQ79vJvSV3o1xee3h04SkoVmPtJ6qEHIDhlWR!4ebLKnnIFjuXmcftki/9x9shlU/6 X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2098 Xref: reader02.eternal-september.org comp.lang.ada:52675 Date: 2018-05-25T11:35:21-04:00 List-Id: On Fri, 25 May 2018 06:52:09 -0700 (PDT), boonflies@gmail.com declaimed the following: > >`void CLIENT_CR >( > CREATE_INFO * CreateInfo, > ID * SessionId, > RESULT * Result >);` > C prototype for a function... >2. In Tftp.ads >`procedure CLIENT_CR( CreateInfo : in Tpkg.CREATE_INFO; > SessionId : out Tpkg.ID; > Result : out RESULT ); > > pragma Import (C, CLIENT_CR, "CLIENT_CR");` > Ada prototype and specification that it maps to a C function... >3. In main.adb >`#With TFTP; > >... >TFTP.CLIENT_CR(INFO,ID,RESULT)` > What's the # doing there? What you have not provided is: a) the actual C implementation of CLIENT_CR b) the link command that uses whatever file contains said C implementation -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/