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-Thread: 103376,55a8252137b5ef97 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe4-gui.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Efficiently setting up large quantities of constant data User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 16 Dec 2004 12:36:57 GMT NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe4-gui.ntli.net 1103200617 81.100.88.147 (Thu, 16 Dec 2004 12:36:57 GMT) NNTP-Posting-Date: Thu, 16 Dec 2004 12:36:57 GMT Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:6991 Date: 2004-12-16T12:36:57+00:00 List-Id: A similar question I have is how to link in regular files and access their contents in Ada. For example, suppose I have a binary file "distances.dat" containing the (road) distances between 1000 different cities. This could be a 2MB file computed by another application. How can I build a single executable file containing the data and access it from the Ada code? I presume this needs to be done at the linker stage, but I don't see any options to link in non-object files. The obvious alternative of distributing the data files separately and reading them in is slower and much less tidy than having a single self-contained binary. (I tried Google, but probably didn't use the right search terms...) -- Adrian