Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT not recognizing IN and OUT keywords(CDT not recognizing IN and OUT keywords)
CDT not recognizing IN and OUT keywords [message #1228842] Wed, 08 January 2014 07:21 Go to next message
Priyadharshini Krushnan is currently offline Priyadharshini KrushnanFriend
Messages: 2
Registered: January 2014
Location: India
Junior Member
I have a huge C project that contains more than 1000 files and when I open this project in Eclipse, I get lot of errors in the editor (Orange squiggly lines).

When I analyze these, they seem to be associated with the IN and OUT keyword. For Example: The following function declaration shows error.

func3 (
IN int *This,
IN char *a,
OUT char **b

MY_TYPE is a typedef for void.
Please let me know how do I resolve this problem.

Actually, I also see some strange behavior which I couldnt understand. When I include the header file containing the definition for MY_TYPE into that c file, then the errors are gone. Alternatively, the errors are gone even if I remove the IN and OUT keywords.

Can anyone please let me know the issue and resolution for this.
I have also attached a sample project simulating this problem.

My current development environment is Indigo and I've tried this issue with Kepler. Both provides the same behavior.

Re: CDT not recognizing IN and OUT keywords [message #1233566 is a reply to message #1228842] Mon, 20 January 2014 01:40 Go to previous message
Eduard Scheske is currently offline Eduard ScheskeFriend
Messages: 3
Registered: December 2013
Location: Germany
Junior Member
If you define a typedef in a header file and want to use this typedef. You have to include this header file
For example your sample.h:
#ifndef SAMPLE_H_
#define SAMPLE_H_

typedef void MY_TYPE;

#endif /* SAMPLE_H_ */

Now include this in your SampleSource1.c and every file where you use MY_TYPE
#include "subsrc/Sample.h"

MY_TYPE func1(int a, int b)

SampleSource1.c should now compile.
You do not need include guard(s) in *.c files, as this files are never included

This are some basic's that you should know, if you are coding in c!
Maybe you do some tutorials first?
Previous Topic:a problem with Remote Debugging (stm32)
Next Topic:Eclipse remote debug cannot connect to X server
Goto Forum:

Current Time: Sun May 27 19:58:55 GMT 2018

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

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

Back to the top