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

invalid use of incomplete type #43

Closed
jcockhren opened this issue Jun 27, 2011 · 1 comment
Closed

invalid use of incomplete type #43

jcockhren opened this issue Jun 27, 2011 · 1 comment

Comments

@jcockhren
Copy link

I'm having trouble compiling Catch with objective-c(++) on OS X 10.6.

Error:
catch.hpp: In function 'size_t Catch::registerTestMethods()': catch.hpp:6186: error: invalid use of incomplete type 'struct Catch::TestCaseInfo' catch.hpp:176: error: forward declaration of 'struct Catch::TestCaseInfo'

Minimal example:

#import<Foundation/Foundation.h>
#import "catch.hpp"
int main (void) {
    return 0;
}

Compiled with gcc 4.2.1:
gcc -o test main.mm -m32 -framework Foundation -lobjc

Thanks,
Jurnell

@philsquared
Copy link
Collaborator

Hi Jurnell,

Do you need to provide your own main() ?
Catch provides main for you if you #define CATCH_CONFIG_MAIN before #including or #importing "catch.hpp"

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

2 participants