From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: calling Ada dll from C?
Date: Sat, 21 Mar 2015 04:43:49 -0500
Date: 2015-03-21T04:43:49-05:00 [thread overview]
Message-ID: <85d2428z3e.fsf@stephe-leake.org> (raw)
I'm using an OpenToken parser with Emacs. In order to make it as fast as
possible, I'm trying to build the parser as a dynamically linked library
(.dll or .so); Emacs 25 will have the ability to load dlls at run time.
I can build the dll with a library project file:
for Library_Name use "ada_wisi_module_parse";
for Library_Dir use "lib";
for Library_Kind use "dynamic";
However, when I try to load that dll into Emacs, it complains with "the
module cannot be found". Of course, it doesn't say _which_ module cannot
be found - sigh.
I get the same error on Windows 7 32 bit and Debian 64 bit. I'm
compiling with GNAT GPL 2014.
On Debian, ldd says all required libraries are found.
A related issue is 'adainit'. According to "(gnat_ugn) Binding with
Non-Ada Main Programs", since the main program is not in Ada, I'm
supposed to run gnatbind with -n, and then call 'adainit' from the C
main program.
However, since I'm only building a dll, not a main program, it appears
gnatbind is not run, so no 'adainit' is generated.
Has anyone build an Ada dll that can be called from C?
--
-- Stephe
next reply other threads:[~2015-03-21 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-21 9:43 Stephen Leake [this message]
2015-03-21 14:19 ` calling Ada dll from C? Simon Wright
2015-03-23 7:23 ` Stephen Leake
2015-03-23 8:36 ` Dmitry A. Kazakov
2015-03-23 13:42 ` Patrick Noffke
2015-03-25 20:48 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox