From: "Alan McFarlane" Newsgroups: comp.os.msdos.djgpp Subject: [Q] Problem with appending datafiles onto executables using Allegro Date: Thu, 6 Jan 2000 12:49:14 -0000 Lines: 64 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 NNTP-Posting-Host: da130d13.dialup.callnetuk.com X-Original-NNTP-Posting-Host: da130d13.dialup.callnetuk.com Message-ID: <38748ec1@eeyore.callnetuk.com> X-Trace: 6 Jan 2000 12:46:57 GMT, da130d13.dialup.callnetuk.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I'm having trouble with appending datafiles onto executable files. The sample code is as follows : -- test.c -- #include #include int main(void) { DATAFILE* data; allegro_init(); data = load_datafile("#"); if (data) { puts("success"); unload_datafile(data); } else { puts("failed"); } allegro_exit(); return (0); } -- eof -- Compile the executable with : gcc -o test.exe test.c -lalleg -Wall -O Create the (blank) datafile with : dat -c0 test.dat Append the datafile to the executable with : exedat -a test.exe test.dat The program should load the appended datafile and display 'success', however the call to load_datafile() always fails. Anyone got any bright ideas? Operating system is Windows 95 [Version 4.00.1111] Allegro version is 3.9.30 (WIP) - Dec 20 1999 DJGPP version is 2.02 GCC version is 2.8.1 DPMI memory available is 32039 Kb DPMI swap space available is 28165 Kb -- Alan McFarlane amcfarlane AT bigfoot DOT com