'stdarg.h' file not found error

2.8k Views Asked by At

I recently upgraded to xcode 6.3.1. I tried creating a sample project from "Master Detail application" template, but build failed with the below error.

  • Device - Universal
  • language - swift
  • Not using Core Data

Errors:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/usr/include/dispatch/dispatch.h:32:10: error: 'stdarg.h' file not found

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk/usr/include/os/activity.h:38:9: error: declaration of 'uint64_t' must be imported from module 'ObjectiveC.runtime' before it is required typedef uint64_t os_activity_t;

I am new to development using Xcode.

2

There are 2 best solutions below

0
idmean On BEST ANSWER

It is likely that your installation of Xcode (or the simulator) is damaged.

You can try reinstalling the developer tools, or completely reinstall Xcode.

1
Mateusz Piotrowski On

You can try to find out whether you've got modules for Objective-C enabled.

You can check it in here (follow the path):

  • Build Settings
  • section Apple LLVM 6.1 - Language - Modules
  • Enable Modules (C and Objective-C)

The answer to this question might be a clue as well: How to disable "curses.h" header (a part of "stdio.h in Xcode 6.3 OSX Yosemite) to avoid conflicting function declarations