From: "cybersaga" <cybersaga@gmail.com>
Subject: Re: DLL Troubles
Date: 19 Mar 2006 12:23:47 -0800
Date: 2006-03-19T12:23:47-08:00 [thread overview]
Message-ID: <1142799827.205623.17800@e56g2000cwe.googlegroups.com> (raw)
In-Reply-To: <441DBB5D.7070401@obry.net>
Actually, I am using a project file, for both the dll and the main
program. Here's what the DLL's project contains:
-------mydll.gpr---------------------
project Mydll is
for Source_Files use ("mydll.adb", "mydll.ads");
for Library_Name use "mydll";
for Library_Kind use "dynamic";
for Library_Dir use "dll";
end Mydll;
-------------------------------------
As to "linking directly to the DLL", I need to be able to load the DLL
dynamically.
I'm beginning to believe this problem stems from my lack of an AdaInit
call, as mentioned in the second post. However, I can't seem to get an
AdaInit call to work. This is what I added to mydll.adb:
----
procedure InitMe is
procedure AdaInit;
pragma Import (C, AdaInit);
begin
AdaInit;
end InitMe;
---
I of course exported that procedure (InitMe) as well. However, when
compiling, I get an error: f:\shs\bugtest\mydll.adb:19: undefined
reference to `adainit'
Line 19 is of course my call to AdaInit.
Am I doing this correctly?
Also, do I need to import using C if I'll only be using this in an Ada
program? Can I do something like "Import (Ada, AdaInit)"? (This of
course doesn't solve the compile problem, I tried).
next prev parent reply other threads:[~2006-03-19 20:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-19 18:46 DLL Troubles cybersaga
2006-03-19 19:22 ` tmoran
2006-03-19 19:27 ` cybersaga
2006-03-19 19:30 ` cybersaga
2006-03-19 20:13 ` Pascal Obry
2006-03-19 20:23 ` cybersaga [this message]
2006-03-19 21:19 ` cybersaga
2006-03-20 1:10 ` cybersaga
2006-03-19 19:37 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox