comp.lang.ada
 help / color / mirror / Atom feed
* C functions for GNAT ?
@ 1994-11-25 17:18 Thierry Nodenot
  1994-11-30 14:31 ` Running GNAT from the VB3 Shell Command Jack Beidler
  0 siblings, 1 reply; 8+ messages in thread
From: Thierry Nodenot @ 1994-11-25 17:18 UTC (permalink / raw)


Who can tell me the right way to import C functions in a program compiled
with GNAT ?
Where can I find the different switches of the GCC compiler ?


Thank you for your answer.



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

* Running GNAT from the VB3 Shell Command
  1994-11-25 17:18 C functions for GNAT ? Thierry Nodenot
@ 1994-11-30 14:31 ` Jack Beidler
  1994-12-05  3:06   ` Lance Kibblewhite
  0 siblings, 1 reply; 8+ messages in thread
From: Jack Beidler @ 1994-11-30 14:31 UTC (permalink / raw)


Has anyone successfully run the MS-DOS version of GNAT from
Microsoft Windows 3.1?  I will be teaching a Rapid Prototyping
Course next year and thought it would be interesting to have
the students prototype an Ada environment in Visual Basic or
Visual C++ and use the Shell command to run GNAT.  A quick
test of this has produced mixed results.  I'm curious if
anyone has tried something similar?

Jack
-- 
+----------------------------------------+------------------------+
|John (Jack) Beidler                    ++   beidler@cs.uofs.edu  |
|  Professor, Computing Sciences Dept. ++                         |
|  University of Scranton             ++  (717) 941-7446 (voice)  |
| Scranton, PA 18510                 ++     (717) 941-4250 (FAX)  |
+------------------------------------+----------------------------+



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

* Re: Running GNAT from the VB3 Shell Command
  1994-11-30 14:31 ` Running GNAT from the VB3 Shell Command Jack Beidler
@ 1994-12-05  3:06   ` Lance Kibblewhite
  1994-12-05 23:03     ` Robert Dewar
  1994-12-06  2:30     ` Michael Feldman
  0 siblings, 2 replies; 8+ messages in thread
From: Lance Kibblewhite @ 1994-12-05  3:06 UTC (permalink / raw)


Jack Beidler (beidler@guinness.cs.uofs.edu) wrote:
: Has anyone successfully run the MS-DOS version of GNAT from
: Microsoft Windows 3.1?  I will be teaching a Rapid Prototyping
: Course next year and thought it would be interesting to have
: the students prototype an Ada environment in Visual Basic or
: Visual C++ and use the Shell command to run GNAT.  A quick
: test of this has produced mixed results.  I'm curious if
: anyone has tried something similar?

I have tried 1.83, and have never got it to work.  I am able to compile 
and bind, but the .EXE's never seem to work.  I can't even get the 
hello.adb example to work!

My installation is plain vanilla, exactly as documented.

-- Lance. (waiting for the next version to maybe work)




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

* Re: Running GNAT from the VB3 Shell Command
  1994-12-05  3:06   ` Lance Kibblewhite
@ 1994-12-05 23:03     ` Robert Dewar
  1994-12-06 16:15       ` Lance Kibblewhite
  1994-12-06  2:30     ` Michael Feldman
  1 sibling, 1 reply; 8+ messages in thread
From: Robert Dewar @ 1994-12-05 23:03 UTC (permalink / raw)


Lots of people have got the DOS version of GNAT to work. I don't know
what problem Lance Kibblewhite
had, as far as I remember he did not contact us.

remember if you have problems, send mail to gnat-report@cs.




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

* Re: Running GNAT from the VB3 Shell Command
  1994-12-05  3:06   ` Lance Kibblewhite
  1994-12-05 23:03     ` Robert Dewar
@ 1994-12-06  2:30     ` Michael Feldman
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Feldman @ 1994-12-06  2:30 UTC (permalink / raw)


In article <3bu04a$94j@news.cais.com>,
Lance Kibblewhite <lance@cais.cais.com> wrote:

>I have tried 1.83, and have never got it to work.  I am able to compile 
>and bind, but the .EXE's never seem to work.  I can't even get the 
>hello.adb example to work!

gnatbl produces an executable in coff form, not a true DOS
.exe. This is not really a GNAT problem, it's really an aspect of
the djgpp (gcc for DOS) extender. This is spelled out in the
djgpp docs but not the GNAT ones, which NYU is trying to keep as
platform-independent as possible.

To run it, try

go32 hello (or whatever the output file is called)

or convert the coff to exe by running

coff2exe hello

The preliminary GNAT 2.0 I got at TRI-Ada fixes this by building the 
conversion into gnatbl. If the official distribution release does too,
it'll solve lots of problems.

The entire extender problem will be fixed with the next release of djgpp,
which is expected in a few months and will use "pure" DPMI memory.

Cheers -

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman -  chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University -  Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax) - mfeldman@seas.gwu.edu (Internet)
------------------------------------------------------------------------
         Ada on the World-Wide Web: http://lglwww.epfl.ch/Ada/
------------------------------------------------------------------------
"Illegitimi non carborundum." (Don't let the bastards grind you down.)
------------------------------------------------------------------------



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

* Re: Running GNAT from the VB3 Shell Command
  1994-12-05 23:03     ` Robert Dewar
@ 1994-12-06 16:15       ` Lance Kibblewhite
  1994-12-07 14:59         ` Peter Hermann
  0 siblings, 1 reply; 8+ messages in thread
From: Lance Kibblewhite @ 1994-12-06 16:15 UTC (permalink / raw)


Robert Dewar (dewar@cs.nyu.edu) wrote:
: Lots of people have got the DOS version of GNAT to work. I don't know
: what problem Lance Kibblewhite
: had, as far as I remember he did not contact us.

: remember if you have problems, send mail to gnat-report@cs.

I don't think the problem is a GNAT problem. I think it is a DJGPP problem.
I only have the DJGPP subset that comes with 1.83.  I'm shortly going to 
retrieve the entrie DJGPP distribution to see if that maybes offers a 
clue.

-- Lance.



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

* Re: Running GNAT from the VB3 Shell Command
  1994-12-06 16:15       ` Lance Kibblewhite
@ 1994-12-07 14:59         ` Peter Hermann
  1994-12-09 15:36           ` Robert Dewar
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Hermann @ 1994-12-07 14:59 UTC (permalink / raw)


Lance Kibblewhite (lance@cais.cais.com) wrote:

: I don't think the problem is a GNAT problem. I think it is a DJGPP problem.
: I only have the DJGPP subset that comes with 1.83.  I'm shortly going to 
: retrieve the entrie DJGPP distribution to see if that maybes offers a 
: clue.

Maybe some of the problems can be removed for some
by looking at my compile-link-go - file I produced
yesterday evening after getting angry about myself
having forgotten to apply the @#*% coff2exe step:

begin of contents of command file clg.bat on MSDOS6.2 :
gcc -c %1.adb
gnatbl -o %1 %1.ali
coff2exe %1
%1
end   of contents of command file clg.bat on MSDOS6.2 

I am using this multistep with one parameter
(where test is the unit name AND the filename(part) ):

   clg test

When I have other packages to "with"
I compile them (first) separately with e.g.:
   gcc -c testpak.ads
and
   gcc -c testpak.adb
and then finally compile, link, go with
   clg test

The good news: it works :-)

--
Peter Hermann  Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
Team Ada: "C'mon people let the world begin" (Paul McCartney)



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

* Re: Running GNAT from the VB3 Shell Command
  1994-12-07 14:59         ` Peter Hermann
@ 1994-12-09 15:36           ` Robert Dewar
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Dewar @ 1994-12-09 15:36 UTC (permalink / raw)


Peter (and those reading his post). Please be aware that the script you
posted is obsolete with respect to GNAT version 2.00, because in GNAT version
2.00, gnatbl automatically does the coff2exe step (something we should have
done in the first place, to avoid this common confusion, but sometimes
the obvious is not as obvious as it should be.




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

end of thread, other threads:[~1994-12-09 15:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-25 17:18 C functions for GNAT ? Thierry Nodenot
1994-11-30 14:31 ` Running GNAT from the VB3 Shell Command Jack Beidler
1994-12-05  3:06   ` Lance Kibblewhite
1994-12-05 23:03     ` Robert Dewar
1994-12-06 16:15       ` Lance Kibblewhite
1994-12-07 14:59         ` Peter Hermann
1994-12-09 15:36           ` Robert Dewar
1994-12-06  2:30     ` Michael Feldman

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