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 11:09:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Jeffrey D. Cherry" Newsgroups: comp.lang.ada Subject: Re: GCC 3.1 with GNAT ... Cool! Date: Thu, 20 Jun 2002 18:09:09 -0000 Organization: Northrop Grumman Message-ID: References: <8db3d6c8.0206200134.1ff139f7@posting.google.com> User-Agent: Xnews/4.11.09 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:26506 Date: 2002-06-20T18:09:09+00:00 List-Id: nma124@hotmail.com (steve_H) wrote in news:8db3d6c8.0206200134.1ff139f7@posting.google.com: > Can you show examples of how to use gcc to compile Ada? Yes, but this is in the documentation that comes with the Ada component of the GCC. Look in the "GNAT User's Guide" that should be in the "info-html" subdirectory of the installation. There is an example in the section titled "Running a Simple Ada Program" details the steps of using the gcc, gnatbind, gnatlink sequence and the equivalent process using gnatmake. > > if one uses 'gcc foo.ada', what about 'gnatmake'? that is what is used > 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? I haven't come accross an Ada project yet that couldn't use gnatmake to build an executable. For example, the largest Ada project I've seen is composed of around 250K SLOC partitioned into about a dozen different executables. The gnatmake program, with the proper command line options, was able to build each of those programs. The Ada language, the GNAT compilation model, and the GNAT configuration pragmas, combined with the versatility of the GCC utilities makes the need for a separate make facility almost completely unnecessary. However, some projects do things like combining units provided from third-party vendors, or object modules and libraries compiled using different high-level languages, or target different platforms, and this requires special steps. In these cases the GNU make facility can provide the needed versatility, and yes, the make file will call the gcc compiler to create the dependent units. Of course, gcc determines which compiler to use depending on the source file's extension or a command line switch. > > this is confusing to me. Examples would help. > > It is strange of how important adding Ada to gcc is, there is almost > nothing on the net that shows examples of how this is done, nothing on > gcc web page and nothing on ACT web page. they mentioned GNAT and gcc, > but no examples, nothing I could find. I would love to provide examples and help make things more clear; however, the documentation that comes with the GNAT component of the GCC provides examples of compiling, linking, and running along with a vast array of suplementary information. I doubt I could do better than what is already available, but if you provide a specific request, I'm sure that I or others reading CLA can elaborate on the processes involved. Keep in mind that the process of creating executables from Ada source is the same as it's always been, and so finding documentation on something that hasn't changed will not be easy. For me, the big savings is having one compiler installation that handles just about all the programming languages that I use either personally or professionaly. -- Regards, Jeffrey D. Cherry Senior IV&V Analyst Northrop Grumman Information Technology