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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Will Ada-95 Programs Written in MS Windows Run in MacOS and Linux Without Some Tweaking. Date: Sat, 07 Dec 2013 13:16:05 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx05.eternal-september.org; posting-host="10c7eb3b0340aed81770a984b2485704"; logging-data="3485"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OrU3tjaAO9jENHfGuGEI6VNjxAQU9nZM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:E/7JnEyXgHrinoqWBx51lZ0r3uE= sha1:KTV8tPkTNIbSOqT06SArzrrxNg4= X-Original-Bytes: 3248 Xref: number.nntp.dca.giganews.com comp.lang.ada:184130 Date: 2013-12-07T13:16:05+00:00 List-Id: Austin Obyrne writes: > My Ada-95 text book came first day - 10 years ago - with a selection > of compilers for Windows, MacOS and Linux. Having a Windows operating > system I automatically installed the Windows compiler from the three > and all has gone very well up to now. That compiler was the gnat > 311.p version. My ciphers written in Ada-95 for Microsoft Windows are > complete and working very well now after years of work. I now want to > get them to run in Macos and/or Linux also. > > It would be naïve to think that they will run in Macos also just by > installing that compiler and ditto for Linux – it would be great if > they did?. > > Before I spend any more money (in short supply) on getting Macos and > Linux equipment could anybody who has experience of doing this tell me > if the programs written for Windows will run in Macos and/or Linux > straight off and if the Windows program source code requires any > modification or even if it runs at all. I just downloaded your Vector Cipher_2 zip file (and deleted all the .o, .ali, .exe and b_*.c files!) and, using GNAT GPL 2013 on Mac OS X, compiled & built real_time_encryption_program_mark_2 with three warnings: real_time_encryption_program_mark_2.adb:589:12: warning: unary minus expression should be parenthesized here real_time_encryption_program_mark_2.adb:612:08: warning: unary minus expression should be parenthesized here real_time_encryption_program_mark_2.adb:743:22: warning: "PlainTextNum" may be referenced before it has a value (there were a lot more with -gnatwa, enable all common warnings) so I think you should be in good shape. Mind you, I didn't run it since I didn't see any obvious instructions on how to run what look like test cases. Before spending any money, why not download the latest GNAT for Windows from libre.adacore.com and try that? Ada code tends to be very portable. I'd strongly recommend not bothering with the Linux or Mac compilers from your textbook; 3.11p is very old, and the Mac version at least won't even run on recent Macs.