I am a hobbiest programmer, (meaning that I program more or less for the fun of it), and am trying to learn how to program using the Windows API. I had the local library borrow Charles Petzold's "Windows Programming: Fifth Edition" from a nearby university. I realize that the book is 14 years old and that there may be better ways code, but, you have to start somewhere. Petzold is still highly recommended. The book came without its CD, so, I have to type in by hand each of the programs. No big deal, learning by doing is usually the best teacher in my experience. (I have also downloaded the SDK for Win 7 from the MicroSoft website for a reference.)
Anyway, I spent about 10 hours typing in the code for a series of .c, .rc, and .h listings that are used to compile and link to a single executable. (For those curious: It is the DIBBLE program in the Palette Manager chapter, pages 919 through 994.) I am using Pelles C, version 6.00, 64-bit, I downloaded last November. (I thought it was the newer 6.5 version; but, the IDE says it is version 6.) My system is 64-bit Windows 7. I compile the project for a WIN32 exe file (not Console). I get only one error message: C:\<FullPathName>\Dibble.c(234): fatal error #1043: Input Buffer Overflow.
I look at line 234. It is a macro. I find it in the relevant .h file and compare it to what is in the book. As far as I can determine it matches. I notice that this macro is composed of another previously defined macro. I check out the previously defined macro and my code listing matches the book. This leads to yet another macro; but, the point here is that I have looked at all my code listings comparing them to the book and found no difference.
I know that an Input Buffer Overflow means that the calling program tried load more data into its buffer than the buffer can hold. My question is which program: the one that I am trying to build or the compiler? I tried to find some reference to setting the size of the buffer that the compiler uses in the help section on my hard drive. (I do not have a home internet connection. I must the the library's when it is open.) I did find sections about setting and using a buffer for data I/O from my program; but nothing about how I might increase the size of the compiler's buffer. I am thinking that since Petzold defined so many macro and forward function references that the compiler ran out of memory. Is this a reasonable deduction? If so, is there a way to increase the buffer size of compiler? If not, could I get around the problem by rewriting the code expanding the macros?
I am sorry that I have made such a long post to ask a simple question. I just wanted to be as clear as possible. I am annoyed that I have spent so many hours typing in the listing and being stopped from running the program by one error; which I can not seem to find any reference to in the compiler help file. I'll check back here Friday morning (GMT - 5 hours) for any responses. Thank you.
Dee