Sudden Lexical or Preprocessor Issue

  • When compiling C++ libraries for OS X, Xcode is suddenly reporting error messages:

    Lexical or Preprocessor Issue
    Unterminated conditional directive

    It occurs in file AvailabilityInternal.h at line 604

    #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_1
      …

    I'm picking up the file by including C++ sstream header file

    #include <sstream>

    (which cascades down to eventually including AvailabilityInternal.h)

    Was there an update to Xcode (I have version 4.6.2 (4H1003)) that is causing this?

    Todd
  • On May 24, 2013, at 10:39 AM, Todd Heberlein <todd_heberlein...> wrote:

    > When compiling C++ libraries for OS X, Xcode is suddenly reporting error messages:
    >
    > Lexical or Preprocessor Issue
    > Unterminated conditional directive

    Easier test: Just create a new C++ command line project for OS X and try to compile it (no changes to the "Hello World" source code). Same error.

    Was there a change to Xcode?  How hard is it to roll back?

    Thanks,

    Todd
  • In Xcode 4.6.2, I created a new project, Mac > Command Line Tool > C++, no ARC. Making no changes, I tried Build, Analyze, and Run. No errors.

    — F

    On 24 May 2013, at 12:46 PM, Todd Heberlein <todd_heberlein...> wrote:

    >
    > On May 24, 2013, at 10:39 AM, Todd Heberlein <todd_heberlein...> wrote:
    >
    >> When compiling C++ libraries for OS X, Xcode is suddenly reporting error messages:
    >>
    >> Lexical or Preprocessor Issue
    >> Unterminated conditional directive
    >
    > Easier test: Just create a new C++ command line project for OS X and try to compile it (no changes to the "Hello World" source code). Same error.
    >
    > Was there a change to Xcode?  How hard is it to roll back?
    >
    > Thanks,
    >
    > Todd
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Xcode-users mailing list      (<Xcode-users...>)
    > Help/Unsubscribe/Update your Subscription:
    > https://lists.apple.com/mailman/options/xcode-users/<fritza...>
    rg

    >
    > This email sent to <fritza...>
    >

    --
    Fritz Anderson
    Xcode 4 Unleashed: 4.5 supplement for free!
    http://www.informit.com/store/xcode-4-unleashed-9780672333279
  • On May 24, 2013, at 10:55 AM, Fritz Anderson <fritza...> wrote:

    > In Xcode 4.6.2, I created a new project, Mac > Command Line Tool > C++, no ARC. Making no changes, I tried Build, Analyze, and Run. No errors.

    I haven't seen any discussions on this in the developer forums either, so something may have just been corrupted on my system.

    Cruds, something has gone south on my machine.

    Xcode: Version 4.6.2 (4H1003)
    OS X: 10.8.3 (12D78)
    Mid 2010 Mac Pro

    AvailabilityInternal.h seems corrupted. Scrolling down to line 685 I see line after line of upside down question marks.

    Is there a standard procedure for getting rid of this file and re-installing it? For example, can I delete it and X code will detect it and download a new version? Should I drag the entire Xcode application to the trash and re-download?

    Thanks,

    Todd
  • > AvailabilityInternal.h seems corrupted. Scrolling down to line 685 I see line after line of upside down question marks.

    Just replaced

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/AvailabilityInternal.h

    with a copy from another machine and everything is working again.

    Sorry for the bit of panic there.

    Todd
  • On May 24, 2013, at 11:16 AM, Todd Heberlein <todd_heberlein...> wrote:

    > AvailabilityInternal.h seems corrupted. Scrolling down to line 685 I see line after line of upside down question marks.

    Yow. Better run Disk Utility and scan your disk ASAP!

    > Is there a standard procedure for getting rid of this file and re-installing it? For example, can I delete it and X code will detect it and download a new version? Should I drag the entire Xcode application to the trash and re-download?

    It’s likely other files have been corrupted too (inside Xcode or out). Safest would be to restore your entire disk from a backup. Short of that, definitely trash Xcode and download a fresh copy.

    —Jens
  • On Fri, 24 May 2013 11:16:38 -0700, Todd Heberlein said:

    >> In Xcode 4.6.2, I created a new project, Mac > Command Line Tool > C+
    > +, no ARC. Making no changes, I tried Build, Analyze, and Run. No errors.
    >
    > I haven't seen any discussions on this in the developer forums either,
    > so something may have just been corrupted on my system.

    Xcode auto-corrupts itself on my system and I have to replace Xcode.app every few weeks. <rdar://13078366>  This doesn't happen to my coworkers.  The biggest difference is that I use a RAID.  Do you?

    Cheers,

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
previous month may 2013 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today