On Mon, Nov 23, 2009 at 2:44 PM, Branko Čibej <br...@xbc.nu> wrote: > Paul Burba wrote: >> On Mon, Nov 23, 2009 at 11:42 AM, Branko Čibej <br...@xbc.nu> wrote: >> >> Brane, >> >> A disclaimer: I haven't generated preprocessed source in an age and >> even then it was with much simpler code than ours...so maybe I'm doing >> this all wrong. >> >> I updated my WC back to r882181, right before I reverted r880584. >> Recall that the first place the problem with __attribute__ no being >> defined arises in in libsvn_subr/config_win.c. So from within the >> VS2008 IDE I changed the Configuration >> Properties:C/C++"Preprocessor:Generate Preprocessed File setting for >> the libsvn_subr project to 'With Line Numbers (/P)' from the default >> of 'No'. Then I rebuilt just the libsvn_subr project. Quite >> unexpectedly (at least to me) config_win.c now compiles, even though >> config_win.i shows that apr.h is not included till well after >> svn_debug.h. All the files in libsvn_subr compile, but no object >> files are created so the build fails. Consider me confused. >> > > I can at least explain the last bit -- MSC doesn't generate object files > when also generating preprocessed source. I've always been frustrated by > that.
Thanks for that bit of info! It's quite comical as the output states that it *is* compiling, when it clearly is not. > Which implicitly explains why config_win.c now "compiles" -- it doesn't > compile, it's just preprocessed, and the preprocessor doesn't worry > about seeing tokens it can't understand. > > But really -- the /correct/ answer is to include apr.h (or svn_config.h) > from svn_debug.h, if you want to use the __attribute__ macro in that > header. Headers should always explicitly include their dependencies. Which gets us right back to my original problem: Including apr.h in svn_debug.h causes those cryptic errors. Ugh. :-(