From: "Nando" <nando89@terra.es>
Subject: Re: Import C
Date: Tue, 27 Jan 2004 05:56:42 GMT
Date: 2004-01-27T05:56:42+00:00 [thread overview]
Message-ID: <u4nRb.2937956$uj6.7517002@telenews.teleline.es> (raw)
In-Reply-To: mailman.19.1075128729.2270.comp.lang.ada@ada-france.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]
Yes... I mean "pragma Import"... sorry for my english :))
I have download several documentation from
http://www.lawebdelprogramador.com, and searching in internet "ADA reference
manual". I also have read the documentation that my compiler has and I have
opened and studied the examples... but they don't word :((
My operating system is Windows XP, and I am writing my own serial device
driver.
I am using the "GNAT ADA 95 COMPILER"
Thank's you for the url :)) The simple code example is very usefull for me.
Now I try to call C routines from my Ada compiler.
Thanks you for your help.
Fernando
"Stephen Leake" <stephen_leake@acm.org> escribi� en el mensaje
news:mailman.19.1075128729.2270.comp.lang.ada@ada-france.org...
> "Nando" <nando89@terra.es> writes:
>
> > Hello!!!
> > I need make an Ada application. I need send and receive some information
> > to/from the serial port communication (from PC to another device).
>
> What operating system are you using? PCs run several operating systems
> (Mac, Linux, Windows, Solaris, ...).
>
> > I don't know how to do it in Ada, but I know to do it in C/C++. I
> > have found the command "pragma inport(C, ...)" but I don't know how
> > it works :((
>
> I think you mean "pragma Import".
>
> What manuals and/or books have you read?
>
> > * Is enough the .C and .H files or I need the object file?
>
> You actually need the operating system serial interface object files,
> not your object files or source files.
>
> > * How my Ada code know what file has my subrutine? i.e., where I say
> > in my Ada source code what files to include?
>
> Hmm. Are you writing your own serial device driver? Or maybe you've
> written a layer over the operating system layer, in C, and you want to
> call that layer from Ada. If that's true, you do need to link in the
> object files produced from your C code.
>
> You specify what files to link on the linker command line. You need to
> say what compiler you are using for me to be more specific.
>
> > If you could give me a little example or documentation you would
> > help me very much.
>
> An example of a simple application using a serial port from Windows is
> at http://www.toadmail.com/~ada_wizard/; get the "com_ports" file.
>
> Hope this helps.
>
> --
> -- Stephe
>
next prev parent reply other threads:[~2004-01-27 5:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-26 13:48 Import C Nando
2004-01-26 14:30 ` Ludovic Brenta
2004-01-27 5:47 ` Nando
2004-01-26 14:51 ` Stephen Leake
2004-01-27 5:56 ` Nando [this message]
2004-01-28 9:30 ` Import C... Works!! but how does it work :/ Nando
2004-01-28 14:24 ` Ludovic Brenta
2004-01-29 17:12 ` 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