简体   繁体   中英

Eclipse C++ project using Mac OS X Lion tools (gcc etc) error

I've successfully built and run an Eclipse C++ project using Mac OS X Lion on my MacBook Pro. I have the latest Xcode tools available on my MacBook Pro. Now I'm trying to do the exact same think on my Mac Pro at home. I have Xcode installed (including the command line tools with gcc) but the gcc compile keeps complaining:

unresolved inclusion: iostream (angle brackets removed)

Both systems are running the latest vernon of Lion and the latest Xcode tools.

You need to locate the iostream.h file. Try this:

In your Eclipse's project, go to Properties > C/C++ General > Paths and Symbols, and select the "Includes" tab. Select "GNU C++" in the Language list and click "Add" to include a directory. Now, browse for C++ sources: on Mac, these should be locate in /usr/include/c++.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM