Mail Archives: djgpp/1996/04/15/18:19:40
Nick Burton <nmr AT doc DOT ntu DOT ac DOT uk> wrote:
>Please I realy, realy need help with this one as an applicaltion
>I wrote for DJGPP 2.6.3 dosent work because of this error, when
>I compile it under 2.7.2, and it must now be compiled under this!
> struct ffblk f;
> int done = findfirst("*.tga",&f,FA_ARCH|FA_RDONLY);
This is a known bug in the gcc2.7.2 sources. When compiling with C++
structures with the packed attribute on their members don't get packed
properly. One solution is to compile the code that requires findfirst
and findnext in C (I have used this soln). However a better solution
is to edit the dir.h file (I think, the one with struct ffblk) and
add:
#ifdef __cplusplus
#pragma pack(1)
#endif
struct ffblk ...
...
#ifdef __cplusplus
#pragma pack(0)
#endif
Which will fix the problem (if there is an error in the above then
feel free to correct me :)
Whenever gcc 2.7.3 comes out this problem will no longer exist.
Malcolm
- Raw text -