From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54f3d61ea706bdc1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-20 09:18:58 PST Message-ID: <3D11FE2C.6C03F39B@sympatico.ca> From: David Marceau X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.17-10mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GCC 3.1 with GNAT ... Cool! References: <8db3d6c8.0206200134.1ff139f7@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 20 Jun 2002 12:09:16 -0400 NNTP-Posting-Host: 65.92.163.193 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1024589534 65.92.163.193 (Thu, 20 Jun 2002 12:12:14 EDT) NNTP-Posting-Date: Thu, 20 Jun 2002 12:12:14 EDT Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:26497 Date: 2002-06-20T12:09:16-04:00 List-Id: 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