Menu

#include HelperMacros.h compiler errors

Help
dgoldsmith
2008-01-09
2013-04-22
  • dgoldsmith

    dgoldsmith - 2008-01-09

    Platform: Windows XP Pro SP2 (via Parallels on an Intel MacBook Pro running OS 10.4.11)
    IDE: Visual Studio 2003 .NET
    cppunit built solo into a debug static library (can supply my vcproj file if desired)
    money example built and worked

    I'm trying to bring my code under test by borrowing things from the money example since that worked.  Accordingly, in the header for my  file containing my test classes I have the line #include <cppunit/extensions/HelperMacros.h>, but with it there, I get 51 compile errors (and two warnings) all referencing c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque; here's the first one, which is typical: "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(510) : error C2146: syntax error : missing ';' before identifier '_Pos'".  If I comment it out (also commenting out in the cpp file the macros which need it, of course) I get no errors and no warnings.  I tried including, in the cpp file containing the test classes, all the headers which come - indirectly - before HelperMacros.h in the money example, to no avail.  Notes: 1) I emphasize that merely including HelperMacros.h doesn't appear to be the problem, since that's included by money, and my money example works.  2) I also emphasize that I'm not getting any "file not found" compile errors, so all headers are being found (albeit perhaps not the right versions).  I'm happy to answer any clarifying questions and/or perform any experiments.  Thanks!

    DG

     
    • dgoldsmith

      dgoldsmith - 2008-01-10

      A lead: as a workaround, I tried cut-and-pasting the macro defs from HelperMacros.h directly into my test header and started adding headers to get this to compile.  Iteratively, I eventually found I had to add TestCaller.h; when I did so, I got the exact same errors I got from including HelperMacros.h!  Hopefully this is enough of a lead for people in the know...

      DG

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.