X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.131.211 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: Long filenames / fopen / exe program / Windows 98 Organization: Systematic Software Message-ID: References: <20040911180020 DOT 88608 DOT qmail AT web60710 DOT mail DOT yahoo DOT com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 Date: Sat, 11 Sep 2004 20:27:11 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw1no 1094934431 24.71.223.147 (Sat, 11 Sep 2004 14:27:11 MDT) NNTP-Posting-Date: Sat, 11 Sep 2004 14:27:11 MDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 11 Sep 2004 11:00:20 -0700 (PDT) in comp.os.msdos.djgpp, William OConnell wrote: >Hello, > >I sent a mail message about an attempt to save a file >using the "fopen" statement in Rhide \ C++ on Windows >98. The LFN switch was set with the -y switch. > >When the program runs under Rhide, there is no >problem, the file is created under the correct name, >even if the name is longer than eight characters. But >when the compiled EXE program runs by itself, the same >attempt cuts off the end of the filename and only >includes the first eight characters. Why does this >happen? How do I fix this? You need to set LFN=y in djgpp.env file in your install directory: editor %DJGPP% or editor $DJGPP depending on your shell and editor; search for LFN=, change to +LFN=y, save, exit; test the program again with a long file name. -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca) fake address use address above to reply