简体   繁体   中英

Force Eclipse to treat .c files as C++

I'm working with an external project that uses .c file extension for C++ files (they will not change this, I have even sent them a full patch).

Is there any way to force Eclipse (autotools project) to index all .c / .h files as C++?

Enter in

Preferences->C/C++->FileTypes

You can see the file association there. It doesn't let me change it in my Eclipse Luna CDT, but what you can do is to override it per project.

Properties->C/C++ General->FileTypes->Use project settings

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