Date: Fri, 2 Jun 2000 16:08:10 +0200 (MET DST) From: pad2369 Message-Id: <200006021408.QAA28100@maggiore.iperbole.bologna.it> To: djgpp AT delorie DOT com, Tilman Sauerbeck References: <003d01bfcc7e$49b668e0$020aa8c0 AT cervantes> <200006021221 DOT OAA13904 AT maggiore DOT iperbole DOT bologna DOT it> <004a01bfcc94$a62c2400$020aa8c0 AT cervantes> In-Reply-To: <004a01bfcc94$a62c2400$020aa8c0@cervantes> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP3 Imap webMail Program 2.0.11 Sender: pad2369 AT iperbole DOT bologna DOT it Subject: Re: cannot compile this code; although it should work Reply-To: djgpp AT delorie DOT com Tilman Sauerbeck : > > I tried to compile it, but I could not because one > > file is missing: formatbitstream.h > > Okay, the error messages are for example: > ... > line 518 "thePH" undeclared (first use in this > function) > line 534 Parse Error before "*" > line 535 Parse Error before "*" > line 536 Parse Error before "myElement" > ... > > This is just an extract of the error messages. OK. Line 534 says: BF_PartHolder *BF_addEntry( BF_PartHolder *thePH, u_int value, u_int length ) ``Parse error before "*" '' means that somehow the structure BF_PartHolder is unknown to the compiler when it reaches that line. The same can be said about the following errors. It seems like the problems is in the definition of those struct's in the .h file... > I tried to pipe them into a > text file but that didn't work. This is because gcc sends error messages to the stderr stream and not stdout. You must redirect messages to stderr in order to pipe them to a file try using redir.exe, like this: redir -eo gcc -c ... > errors.txt where ``...'' means the rest of the command you are using to compile. > I attatched the Header-File, too. Unfortunately, the .h file includes another one: machine.h! :-) I tried to compile replacing the #include "machine.h" line with two typedef's for u_int and u_short. I then tried to compile and I had *no* errors. It seems that the problem is caused by this machine.h file. Post the exact list of error messages and machine.h. ciao Giacomo ------------------------------------------------------ Giacomo Degli Esposti - pad2369 AT iperbole DOT bologna DOT it