comp.lang.ada
 help / color / mirror / Atom feed
From: David Marceau <davidmarceau@sympatico.ca>
Subject: Re: GCC 3.1 with GNAT ... Cool!
Date: Thu, 20 Jun 2002 12:09:16 -0400
Date: 2002-06-20T12:09:16-04:00	[thread overview]
Message-ID: <3D11FE2C.6C03F39B@sympatico.ca> (raw)
In-Reply-To: 8db3d6c8.0206200134.1ff139f7@posting.google.com

steve_H wrote:
> 
> hello;
> 
> Can you show examples of how to use gcc to compile Ada?
> 
> if one uses 'gcc foo.ada', what about 'gnatmake'? that is what is used
gnatmake -v -g foo.adb

> more of the time. do you then now use normal Makfile to build your software
> and call 'gcc' from inside the makefile, or do you still use gnatmake?

In a standard makefile, you will find a rule for a target ada
executable.  
In this you will find gnatmake blahblah.adb.  That's all.
My suggestion if you really want to see what's going on, turn on the
verbose switch
for both the make tool(make -d) and for the gnatmake tool(gnatmake -v).  
This will help see what's going on with gcc and all the rest.

EMACS USAGE WHEN COMPILING WITHOUT LEARNING ADA FUNCTIONALITY FROM GNAT
MACROS
------------------------------------------------------------------------------
Emacs is huge and has a lot of functionality.  My suggestion for a first
shot use of emacs without reading up too much on it:
emacs &
crtl-d
yourdirectorywithmakefile
enter
alt-x shell
Now this all looks like a standard console but it's not.  You can ctrl-s
to search for anything in the window.  This is very handy.
You can also pageup an pagedown.  This avoids you from having to use a
mouse in the normal terminal.
This is very handy when you know you're going to have multi-page
output.  There are more ways of building with emacs, but RTFM for those.
Now getting to the recipe you have probably seen before:
RECIPE FOR COMPILING ADA PROJECTS
---------------------------------
./configure --prefix=/usr/local
make
make install

You should be able to compile the real ada projects 1)adasockets,
2)xmlada, 3)aws with the above recipe.

SOURCE CODE to COMPILE WITH ADA
-------------------------------
You want sample code go get the source/sample code from act europe for
adasockets, xmlada, aws:
http://libre.act-europe.fr/

ENVIRONMENT VARIABLES
---------------------
The above assumes you successfully compiled gcc31.
The above assumes you have set your environment variables:
export PATH=$PATH:/home/david/gcc31tars/gcc-3.1/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/david/gcc31tars/gcc-3.1/lib
Note:These are not the official places for these.  If you had problems
compiling gcc31, I have already been told this is not the place.
Go to the gcc mailing list.

AFTER DOING ALL THE ABOVE
-------------------------
Run a aws sample:
cd aws
cd demos
./hello_world

Then check out:
lynx localhost:8080

Cheers,
David Marceau



  reply	other threads:[~2002-06-20 16:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19 23:53 GCC 3.1 with GNAT ... Cool! Jeffrey D. Cherry
2002-06-20  1:06 ` Ted Dennison
2002-06-20 15:56   ` Jeffrey D. Cherry
2002-06-20 17:51   ` Florian Weimer
2002-06-20  5:22 ` achrist
2002-06-20 17:30   ` Jeffrey D. Cherry
2002-06-20 19:53     ` achrist
2002-06-20  9:34 ` steve_H
2002-06-20 16:09   ` David Marceau [this message]
2002-06-20 18:09   ` Jeffrey D. Cherry
2002-06-21 12:05   ` Georg Bauhaus
2002-06-21 11:24 ` Marc A. Criley
2002-06-21 14:39 ` Wes Groleau
2002-06-21 14:58   ` SIMON Claude
replies disabled

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