slboat
slboat

Reputation: 532

Xcode can jump to the #define of c stand lib

i use xcode to write a c command line program,but i found the jump to define is not work well for the stand lib,i record a picture to show what happen,is that normal with xcode?

it cant jump the define of the limits.h

            //
            //  main.c
            //  0.4 xCodecantjump
            //
            //  Created by Sen on 14-5-19.
            //  Copyright (c) 2014年 SLboat. All rights reserved.
            //

            #include <stdio.h>
            #include <limits.h>
            #include "main.h"

            int main(int argc, const char * argv[])
            {
                int a = INT_MAX;
                int c = INT_MIN;
                int b = START;
                // insert code here...
                printf("some int: %d, %d, %d\n", a, c ,b);
                return 0;
            }

Upvotes: 3

Views: 1329

Answers (1)

9dan
9dan

Reputation: 4272

I suspect it is some kind of ObjC optimization.

Preprocess result

Switching to C++ Source compilation solved this problem (with rebuild).

select C++ Source in the info tab (on the right)

Upvotes: 3

Related Questions