I am building a static library which has some c functions (both .h and .m file) with return type bool, after adding it to my existing project I am getting Unknown Type name 'BOOL'. I tried importing stdbool.h but still I am getting same error.So can someone tell me right way to add c functions in Xcode project.The method definition looks like
BOOL isDeviceWorkingFine();
In stdbool.h, the definition is provided as bool which is a MACRO which gets expanded to _Bool. The BOOL you're using is not standard C.
If you want to use the standard definition provided by stdbool.h, you may want to change the BOOL to bool.
Otherwise, you need to use some other specific header file, which actually provides the definition of BOOL for your implementation.NOTE
NOTE: as mentioned in the comments by Mr Blagovest Buyukliev, you may need <Foundation/Foundation.h>.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With