comp.lang.ada
 help / color / mirror / Atom feed
* Help on import a dll in ada, thx ^_^
@ 2003-01-20 10:49 Sim Con
  2003-01-20 11:52 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 3+ messages in thread
From: Sim Con @ 2003-01-20 10:49 UTC (permalink / raw)


Hello! I have this problem: i'd like to use a dll of mine in ada, but i
don't know the right procedure. I make a .ads with the bindings
(example:

package DLCBIND is

  pragma LINKER_OPTIONS ("-ldlcman");

  function INITIALIZE (
        MACADDRESS : INTERFACES.C.CHAR_ARRAY; 
        REMOTESAP  : INTERFACES.C.INT;        
        LOCALSAP   : INTERFACES.C.INT         ) 
    return INTERFACES.C.INT; 
  pragma IMPORT(STDCALL,INITIALIZE,"initialize");
...

)

where dlcman is the name of the .dll and .lib (in the same directory of
the sources .ads and the .adb test file) and the initialize function is
one exported by the dll (build in vc++). All compile fine but the test
adb file in which i call the functions, i receive an undefined reference
to initialiaze. Any help? thanx in advance ^_^


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help on import a dll in ada, thx ^_^
  2003-01-20 10:49 Help on import a dll in ada, thx ^_^ Sim Con
@ 2003-01-20 11:52 ` David C. Hoos, Sr.
  2003-01-22 14:43   ` Sim Con
  0 siblings, 1 reply; 3+ messages in thread
From: David C. Hoos, Sr. @ 2003-01-20 11:52 UTC (permalink / raw)
  To: comp.lang.ada mail to news gateway; +Cc: sicon

You didn't specify which Ada compiler you're using, so it's impossible
to answer your question definitively.

If you're using gnat-3.15p, you need to follow the instructions given in
section 25.7 of the GNAT User Guide.

----- Original Message ----- 
From: "Sim Con" <sicon@hotmail.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: January 20, 2003 4:49 AM
Subject: Help on import a dll in ada, thx ^_^


> Hello! I have this problem: i'd like to use a dll of mine in ada, but i
> don't know the right procedure. I make a .ads with the bindings
> (example:
> 
> package DLCBIND is
> 
>   pragma LINKER_OPTIONS ("-ldlcman");
> 
>   function INITIALIZE (
>         MACADDRESS : INTERFACES.C.CHAR_ARRAY; 
>         REMOTESAP  : INTERFACES.C.INT;        
>         LOCALSAP   : INTERFACES.C.INT         ) 
>     return INTERFACES.C.INT; 
>   pragma IMPORT(STDCALL,INITIALIZE,"initialize");
> ...
> 
> )
> 
> where dlcman is the name of the .dll and .lib (in the same directory of
> the sources .ads and the .adb test file) and the initialize function is
> one exported by the dll (build in vc++). All compile fine but the test
> adb file in which i call the functions, i receive an undefined reference
> to initialiaze. Any help? thanx in advance ^_^
> 
> 
> -- 
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
> 
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help on import a dll in ada, thx ^_^
  2003-01-20 11:52 ` David C. Hoos, Sr.
@ 2003-01-22 14:43   ` Sim Con
  0 siblings, 0 replies; 3+ messages in thread
From: Sim Con @ 2003-01-22 14:43 UTC (permalink / raw)


> If you're using gnat-3.15p, you need to follow the instructions given in
> section 25.7 of the GNAT User Guide.

well, i am using gnat 3.14 but i find in the user manual the procedure
for my problem, but nothing happen.

My dll works fine in Visual Basic, so, i suppose, it isn't the problem.
I put the dll file, the . lib file and also the libxxx.a file in the
same directory of my project (with the spec file and the pragma linker
option with -lnameDLL)
compile, but always i receive an undefined reference when linking ;( any
helps? thanx in advance!!


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-22 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 10:49 Help on import a dll in ada, thx ^_^ Sim Con
2003-01-20 11:52 ` David C. Hoos, Sr.
2003-01-22 14:43   ` Sim Con

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