C: Semantic issue

I can't figure out why I'm getting the warning ⚠


  • Implicitly declaring library function 'printf' with type 'int (const char *, ...)'
  • Include the header or explicitly provide a declaration for 'printf'


The header was included.


Screenshot


*Using Xcode 11.1 the default Xcode compiler MacOS Catalina.

Something is wrong with the Xcode on the new MacOS Catalina? I'm missing something?

Thanks in advance 😊

Replies

I'm getting the same semantic errors has anyone figured this out?

"Something is wrong with the Xcode on the new MacOS Catalina?"


Yes and Yes. XCode 11 logs all kinds of spurious errors. There are several threads about this. XCode logs errors when you try to include some UI objects from Interface builder, such as NSPopupButton and NSBoxCustom.


There's some chance that #import would work better than #include. Also you could try to clean the build folder and rebuild the project. You can get XCode 10.3 from the developer site but Catalina won't uncompress it unless you upgrade to the first update of Catalina. There's a thread about this as well. Good Luck.

Running your project with XCode 10.3 won't solve the problems of spurious errors. So it looks like the problem is Catalina.