Stanislav Pankevich
Stanislav Pankevich

Reputation: 11378

Xcode produces warnings 'Implicit declaration of function N is invalid in C99' for C functions imported in .pch file

Unlike the behavior described in this SO topic: xCode 4.4 does not get all the .pch file headers imports?, my project does builds successfully, but anyway I see these annoying yellow highlights Xcode gives me in its editors.

How can I teach Xcode to pick up .pch-file headers imports or is this a buggy behavior?

Upvotes: 5

Views: 7789

Answers (2)

aroragourav
aroragourav

Reputation: 314

I fixed it by adding #include <arpa/inet.h> in .pch file of my xcode project

Upvotes: -2

Stanislav Pankevich
Stanislav Pankevich

Reputation: 11378

This is very strange, but after restarting Xcode and cleaning build folder (just one more command+alt+shift+K in response to @Matthias comment) warnings have gone.

I say 'strange' because I did see them for about a week (after I had extracted a couple of small utility C functions as a Cocoa Pod and had begun importing them in my .pch-file).

I will provide more details here, if I ever see this behavior again and notice any details about how it can occur.

Upvotes: 3

Related Questions