Monday, May 24, 2010

Trouble in the header file pshpack.h in C during compilation.?

While compiling a C program to connect the front end C, with the MS-Access database, I get a FATAL error like this::





"" Fatal INCLUDE\PSHPACK.H 7 : Error Directive " 1 as alignment isn't supported by the compiler""





What is a fatal error?How do I rectify this error. I have a TURBO C/C++ compiler and I downloaded this include file %26lt;pshpack.h%26gt; only recently.

Trouble in the header file pshpack.h in C during compilation.?
A fatal error is any error that the compiler / linker /assembler has designated, internally or by an input switch, to stop creation of output files on. In other words, it is "fatal" to the process. These are usually big boo-boos.





In this case, I have little information to base an answer on. It would have been nice to know what version of the compiler, where the file was downloaded from and what it is touted to do and by who.





At a guess from what I see (including the error verbatim was very smart!), the code alignment is wrong and set at 1. Probably this relates to boundary alignments, which enter into the complex world of Windows file format options, such as PE(Packed Executable) files. I would hazard a guess that one of the following two things is happening.





1). Your version of Borland Turbo C / C++ is too old to have facilities to handle this type of boundary alignment as the library and header files need.





2). Your compiler is capable to handle this type of file alignment, but the automatic or default settings ( which are usually set to allow most compilations to be as painless as possible!) have been accidentally or intentionally changed to something non-compatible with the current project.





I hope that this gives some idea of the problems roots. When in doubt, investigate the documentation thoroughly. All advice is free and damn well worth it!

peony

No comments:

Post a Comment