Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

hieuhoang

macrumors newbie
Original poster
Feb 18, 2012
5
0
Hi ,

I am new to Xcode and I am struggling with this : I have some .h files and have tried to put them to /usr/include or /usr/local/include or one directory but when importing or including in xcode I met this : lexical or preprocessor issue 'string' file not found .

anyone know how to fix this ? thanks in advance
 
Hi ,

I am new to Xcode and I am struggling with this : I have some .h files and have tried to put them to /usr/include or /usr/local/include or one directory but when importing or including in xcode I met this : lexical or preprocessor issue 'string' file not found .

anyone know how to fix this ? thanks in advance

Slow down, cowboy.

Putting header files into /usr/include or similar is a VERY BAD IDEA unless you know exactly what you are doing - which you don't. You are in danger of SERIOUSLY MESSING UP YOUR MACINTOSH.

Why don't you start from the beginning and tell us what you are actually trying to do?
 
I have some .h files and have tried to put them to /usr/include or /usr/local/include or one directory but when importing or including in xcode I met this : lexical or preprocessor issue 'string' file not found .

There are two things to check:

1. Check your system path to see if /usr/include or /usr/local/include are on your path. Do this by going to the terminal and entering "echo $path".

2. As a backup, you can set this is your project settings. In the file listing on the left side, click on the project. Go to the build settings tab and check the paths that are set there. You can specify specific paths to check for headers.
 
Slow down, cowboy.

Putting header files into /usr/include or similar is a VERY BAD IDEA unless you know exactly what you are doing - which you don't. You are in danger of SERIOUSLY MESSING UP YOUR MACINTOSH.

Why don't you start from the beginning and tell us what you are actually trying to do?

thank you, but what is the good idea ? I have no ideas to start (from the beginning ) . Any advices ?
 
There are two things to check:

1. Check your system path to see if /usr/include or /usr/local/include are on your path. Do this by going to the terminal and entering "echo $path".

2. As a backup, you can set this is your project settings. In the file listing on the left side, click on the project. Go to the build settings tab and check the paths that are set there. You can specify specific paths to check for headers.

Hi, I did as yours but . "echo $path" responsed nothing !
 
1. Check your system path to see if /usr/include or /usr/local/include are on your path. Do this by going to the terminal and entering "echo $path".

What do you think adding /usr/include and /usr/local/include to the lower case path variable would accomplish exactly ?
 
thank you, but what is the good idea ? I have no ideas to start (from the beginning ) . Any advices ?

Of course. Read my previous post, then spot this line:

"Why don't you start from the beginning and tell us what you are actually trying to do?"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.