Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » error in #include statement(CDT can't resolve file from #include without file extension)
error in #include statement [message #901398] Sat, 11 August 2012 18:20 Go to next message
Ernst Maurer is currently offline Ernst MaurerFriend
Messages: 29
Registered: January 2011
Junior Member

Hello,
I'm using CDT for editing the scripts with C-like syntax
and there are usual #include instructions,
but without extensions, what I mean:

script:
"...
#include "header_file_name"
...
int main() {
...
}
...
"
but real file name in the file folder:
"header_file_name.xxx"

thus CDT can't resolve file name without extension, and doesn't extract the types from the header.

could you recommend me any possible way to fix this problem in CDT without changing file name on the drive and without changing #include instruction?

[Updated on: Sat, 11 August 2012 18:22]

Report message to a moderator

Re: error in #include statement [message #901498 is a reply to message #901398] Mon, 13 August 2012 07:35 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
In Project Properties->C/C++ General->File Types you can add your *.xxx files as C or C++ header. Then these files you be correctly indexed.

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: error in #include statement [message #901539 is a reply to message #901498] Mon, 13 August 2012 09:47 Go to previous messageGo to next message
Ernst Maurer is currently offline Ernst MaurerFriend
Messages: 29
Registered: January 2011
Junior Member

<here was a question which is currently clear for me>
Thank you!

[Updated on: Mon, 13 August 2012 12:33]

Report message to a moderator

Re: error in #include statement [message #901552 is a reply to message #901539] Mon, 13 August 2012 11:04 Go to previous message
Ernst Maurer is currently offline Ernst MaurerFriend
Messages: 29
Registered: January 2011
Junior Member

in addition to previous post,
Axel, I've tried your solution
unfortunatelly, it doesn't work ,
C/C++ parser in CDT doesn't see include WITHOUT extensions yet as I've described above
for example :
...
#include "INC_Date"
#include "INC_Log"
...

it raises a errors by C++ parser in editor
but this:
...
#include "INC_Date.xxx"
#include "INC_Log.xxx"
...
does not,
but second variant can't be compiled by script engine
Previous Topic:OpenMP and Eclipse
Next Topic:Windows SDK with CDT
Goto Forum:
  


Current Time: Thu Apr 25 22:33:56 GMT 2024

Powered by FUDForum. Page generated in 0.03207 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top