Conditionally declaring a BOOL in a .m file to be accessed in a .c function
Conditionally declaring a BOOL in a .m file to be accessed in a .c function
- Subject: Conditionally declaring a BOOL in a .m file to be accessed in a .c function
- From: Alex Zavatone <email@hidden>
- Date: Tue, 20 Sep 2016 10:14:56 -0500
I've been beating my head against the wall on this one.
I'm trying to evaluate a condition and declare or conditionally #define a macro within an Objective-C method function that can be checked within a c function.
Ideally, I'd just like a #define, but this
like it to be a BOOL or, since this is going to be checked in c, a bool.
I've tried all sorts of combinations of #define and extern and checking with #if and #ifdef if I can even get this to compile.
The C file can't import the header of the Obj-C file or else I've got a few hundred errors on my hands.
I can't even get the #define to be recognized in the C file.
Any pointers here on how to proceed?
Goal:
I'm looking to declare or define a "thing" from a .m method that is scoped so that it can be checked within a c file that can not import the .h file for that .m file.
Will I need an intermediate file and class for this?
Thanks.
Alex Zavatone
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden