• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with #include <unistd.h> - 'close' was not declared
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with #include <unistd.h> - 'close' was not declared


  • Subject: Re: Problem with #include <unistd.h> - 'close' was not declared
  • From: Alastair Houghton <email@hidden>
  • Date: Tue, 20 Nov 2007 14:03:12 +0000

On 20 Nov 2007, at 13:39, Tom O'Grady wrote:

I'll try to check out that windows / non-windows issue out. I've also found that in ap_config.h:


#ifndef BEOS #define closesocket(s) close(s) #endif

Yeah, you probably want to look through your code to check that there isn't any more of that kind of thing. I'd still put money on a stray #define being the cause of the problem here.


Another thing to check is that nobody has done a

  #define _UNISTD_H_

anywhere in your code. That could cause these kinds of symptoms, especially if someone somewhere explicitly #includes <sys/unistd.h> (remembering that some of the system headers might... <sys/file.h> does, for instance)

Also, if someone has written

  #include "/usr/include/unistd.h"

or similar with an explicit full path, I'm not sure that the SDK stuff will get involved at all, so that too would explain why you might think that it's included one file and not the other.

The stdafx.h point is noted - I'm mainly involved with porting applications from PC to Mac, so it usually works out ok sharing a stdafx.h file but wrapping the platform-specific stuff in #if WIN32 etc. The files are shared so if I was using a different header / prefix header, it might be a headache to keep both up-to-date for every single project (i.e. when the other guy modifies his side but doesn't tell me, or vice versa). I think I can just #include my stdafx.h in my prefix header if i want it to be precompiled like that...?

Yes, that should work.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Problem with #include <unistd.h> - 'close' was not declared (From: "Tom O'Grady" <email@hidden>)
 >Re: Problem with #include <unistd.h> - 'close' was not declared (From: Alastair Houghton <email@hidden>)
 >Re: Problem with #include <unistd.h> - 'close' was not declared (From: "Tom O'Grady" <email@hidden>)

  • Prev by Date: HOW TO USE- Shared Object library in C++ for flash?
  • Next by Date: Feature request: Print with line lumbers - or did I miss something ?
  • Previous by thread: Re: Problem with #include <unistd.h> - 'close' was not declared
  • Next by thread: Re: Problem with #include <unistd.h> - 'close' was not declared
  • Index(es):
    • Date
    • Thread