comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: undefined reference while calling an imported c function as procedure in ada
Date: Fri, 25 May 2018 11:35:21 -0400
Date: 2018-05-25T11:35:21-04:00	[thread overview]
Message-ID: <f1bggdhub712b1amj99ee41n6ab9k2c06k@4ax.com> (raw)
In-Reply-To: e7839a03-f2bf-4c6f-80cb-58b38792e247@googlegroups.com

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/ 

  parent reply	other threads:[~2018-05-25 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 13:52 undefined reference while calling an imported c function as procedure in ada boonflies
2018-05-25 14:31 ` Jacob Sparre Andersen
2018-05-25 15:35 ` Dennis Lee Bieber [this message]
2018-05-25 15:41 ` Niklas Holsti
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox