Eclipse add c/C + + header file Jump __c++

Source: Internet
Author: User
Eclipse in the new C or C + + to the project, the header file alarm, display "unresolved inclusion:<stdio.h>" although not affect the project to compile and run, it is also unable to check the document, people feel really uncomfortable. The following is a foreign to the Web site to see the solution, I organized a bit to share. about configuring the/C + + development environment under eclipse here's not much to say.

View the C library file to the path under the terminal:$ echo "int main () {return 0;}" > a1.c $ gcc-v a1.c #include "..." search starts here: #include <...> se Arch starts here:/usr/lib/gcc/x86_64-linux-gnu/4.9/include/usr/local/include/usr/lib/gcc/x86_64-linux-gnu/4.9/in   Clude-fixed/usr/include/x86_64-linux-gnu/usr/include the end of the search list. ......
to view the C + + library files to the search path:$ echo "int main () {return 0;}" > A1.cpp $ g++-v a1.cpp #include "..." search starts here: #include <...&gt ; Search starts here:/usr/include/c++/4.9/usr/include/x86_64-linux-gnu/c++/4.9/usr/include/c++/4.9/backward/usr/ lib/gcc/x86_64-linux-gnu/4.9/include/usr/local/include/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed/usr/ Include/x86_64-linux-gnu/usr/include
End of search list. The above path varies from person to person.
In Eclipse, menu window--> Preferences--> C + +--> build--> Environment Add environment variable C_include_path 6_64-linux-gnu/4.9/include:/usr/local/include:/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed:/usr/include/x86 _64-linux-gnu:/usr/include Cplus_include_path =/usr/include/c++/4.9:/usr/include/x86_64-linux-gnu/c++/4.9:/usr/ include/c++/4.9/backward:/usr/lib/gcc/x86_64-linux-gnu/4.9/include:/usr/local/include:/usr/lib/gcc/x86_64- Linux-gnu/4.9/include-fixed:/usr/include/x86_64-linux-gnu:/usr/include Remember to select the following append variables to native   Environment. Restart Eclipse's new project when you are finished adding it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.