Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Inconsistent compiler results
Inconsistent compiler results [message #1456652] Thu, 30 October 2014 15:32 Go to next message
Dan Miller is currently offline Dan MillerFriend
Messages: 3
Registered: October 2014
Junior Member
I am trying to build our ARM9 project in Eclipse. I included all the related files, and specified all required include directories.

I have one .C file, which includes a header file lowseg.h. This header file includes the following declaration:
typedef enum
{ Bit_RESET = 0,
Bit_SET
}BitAction;

This file has always compiled fine with the Yagarto toolchain that I use for building the project. When I try to build the project in Eclipse, I get:

Description Resource Path Location Type
Symbol 'Bit_RESET' could not be resolved startup.c /OduArm9/arm_lib line 305 Semantic Error
Symbol 'Bit_RESET' could not be resolved startup.c /OduArm9/arm_lib line 314 Semantic Error
Symbol 'Bit_RESET' could not be resolved startup.c /OduArm9/arm_lib line 323 Semantic Error
Symbol 'Bit_SET' could not be resolved startup.c /OduArm9/arm_lib line 41 Semantic Error
Symbol 'Bit_SET' could not be resolved startup.c /OduArm9/arm_lib line 303 Semantic Error
Symbol 'Bit_SET' could not be resolved startup.c /OduArm9/arm_lib line 312 Semantic Error
Symbol 'Bit_SET' could not be resolved startup.c /OduArm9/arm_lib line 321 Semantic Error

However, If I make a copy of this enum within the .C file, I then get:
Description Resource Path Location Type
conflicting types for 'BitAction' startup.c /OduArm9/arm_lib line 19 C/C++ Problem
make: *** [arm_lib/startup.o] Error 1 OduArm9 C/C++ Problem
previous declaration of 'BitAction' was here lowseg.h /OduArm9/arm_lib line 19 C/C++ Problem
previous definition of 'Bit_RESET' was here lowseg.h /OduArm9/arm_lib line 17 C/C++ Problem
previous definition of 'Bit_SET' was here lowseg.h /OduArm9/arm_lib line 19 C/C++ Problem
redeclaration of enumerator 'Bit_RESET' startup.c /OduArm9/arm_lib line 17 C/C++ Problem
redeclaration of enumerator 'Bit_SET' startup.c /OduArm9/arm_lib line 19 C/C++ Problem

So apparently Eclipse can see the header file contents, but it can't see them?? I don't understand what is wrong here...
Re: Inconsistent compiler results [message #1456712 is a reply to message #1456652] Thu, 30 October 2014 16:47 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
It seems that the compiler does see your header file, but the CDT editor parser does not.

Check that the directory of the header file is seen in the 'includes' section of the project explorer on left. If it is not, use the Project Properties menu to add it in.


--

Tauno Voipio
Previous Topic:How to delete predefined perspective in eclipse?
Next Topic:Eclipse does not create the exe-file in debug directory after successful build
Goto Forum:
  


Current Time: Thu Oct 10 17:16:02 GMT 2024

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

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

Back to the top