Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single include for c++ use no longer compiles #48

Closed
jcockhren opened this issue Aug 13, 2011 · 4 comments
Closed

Single include for c++ use no longer compiles #48

jcockhren opened this issue Aug 13, 2011 · 4 comments

Comments

@jcockhren
Copy link

The error produced is quite lengthy, but below is a snipet.

In file included from tests.cc:19:
../include/catch.hpp: In member function ‘virtual void Catch::TestRegistry::registerTest(const Catch::TestCaseInfo&)’:
../include/catch.hpp:3108: error: invalid use of incomplete type ‘const struct Catch::TestCaseInfo’
../include/catch.hpp:176: error: forward declaration of ‘const struct Catch::TestCaseInfo’
../include/catch.hpp:3111: error: invalid use of incomplete type ‘const struct Catch::TestCaseInfo’
../include/catch.hpp:176: error: forward declaration of ‘const struct Catch::TestCaseInfo’
../include/catch.hpp:3112: error: invalid use of incomplete type ‘struct Catch::TestCaseInfo’
../include/catch.hpp:176: error: forward declaration of ‘struct Catch::TestCaseInfo’
../include/catch.hpp:3112: error: return-statement with a value, in function returning 'void'

The error exists from commit 8350ef to 83224e (current HEAD). This seems to be a side-effect of the fix for Issue #47

@newread
Copy link

newread commented Aug 14, 2011

Cannot compile since this hpp file is messied up with #ifdef of OBJC, TestCaseInfo class definition is wrapped in OBJC ifdef so that none-OBJC compile would always fail,
anybody wants to fix it ?

I have a workable version by removing all OBJC ifdef section. this is ok for me to get my unit test going.
thanks

@philsquared
Copy link
Collaborator

Sorry guys.
I didn't do enough testing before that last check-in.

All fixed now (as far as I can see here). Please try again.

@jcockhren
Copy link
Author

Sorry it took me a while to get around to this.
It's compiles fine for both objective-c++ and c++ now.

@philsquared
Copy link
Collaborator

Thanks Jurnell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants