From: Roland Exler Newsgroups: comp.os.msdos.djgpp Subject: Re: problem Date: Thu, 24 Apr 1997 09:14:31 -0700 Organization: Institute for el. Measurement, University of Linz, Austria Lines: 35 Message-ID: <335F86E7.8E9@jk.uni-linz.ac.at> References: <335E0202 DOT DE5 AT mag00 DOT cedi DOT unipr DOT it> NNTP-Posting-Host: sensor4.emt.uni-linz.ac.at Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Stefano Brozzi wrote: > > Ok, copy this program. Call it imOK.c, compile. it works correctly. > Rename it imKO.cc, compile. Two heading chars are missing in filenames. > Please explain. It's late in the night, am I missing something ? *** Program code deleted from original message *** It seems you're using gcc 2.7.2. It had problems with packed structures so it changed alignment of some variables with c++ - the dos-structures in dir.h for example. Download and install gcc 2.7.2.1 and the problem will be solved. Another possibility is adding lines like the following in dir.h (I don't remember the exact syntax): #ifdef __CPLUSPLUS__ #pragma pack(1) #endif ** definition of structure ** #ifdef __CPLUSPLUS__ #pragma pack() #endif Hope this helps, Roland +---------------------------------------+---------------------------+ I Roland Exler I EMAIL: I I Universitaet Linz I R DOT Exler AT jk DOT uni-linz DOT ac DOT at I I Institut fuer Elektrische Messtechnik I I I Altenbergerstr. 69 I Phone: I I A-4040 Linz, AUSTRIA I + 43 732 2468 9205 I +---------------------------------------+---------------------------+