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" escribi� en el mensaje news:mailman.19.1075128729.2270.comp.lang.ada@ada-france.org... > "Nando" 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 >