Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Data Type uint64 can not be resolved
Data Type uint64 can not be resolved [message #1732219] Fri, 13 May 2016 13:46 Go to next message
Gulam Helbig is currently offline Gulam HelbigFriend
Messages: 7
Registered: May 2016
Junior Member
Hello,

I do not understand why the indexer can resolve "uint32_t" but "uint64_t" it is not working.
Please see the screenshot.
index.php/fa/25903/0/


KR
Gulam

[Updated on: Sun, 15 May 2016 16:15]

Report message to a moderator

Re: Data Type uint64 can not be resolved [message #1732224 is a reply to message #1732219] Fri, 13 May 2016 14:10 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You need to include stdint.h to use them. The indexer sometimes remembers definitions from other code when it shouldn't.


Re: Data Type uint64 can not be resolved [message #1732315 is a reply to message #1732224] Sun, 15 May 2016 16:25 Go to previous messageGo to next message
Gulam Helbig is currently offline Gulam HelbigFriend
Messages: 7
Registered: May 2016
Junior Member

Quote:
You need to include stdint.h to use them

This is why it is so strange. I have included the stdint.h.

Quote:
The indexer sometimes remembers definitions from other code when it shouldn't.

I do not think this is the case.
Actually when i set the cursor on the data type uint32_t(above the complaint with the uint64_t) and press F3 (go to definition) the file stdint.h appears with the according for uint32_t definition and below also with the definition for the datatype uint64_t.

Re: Data Type uint64 can not be resolved [message #1732323 is a reply to message #1732315] Sun, 15 May 2016 21:08 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Does your code compile?

What isunsigned __INT64? That's what is being called uint64_t. Is it defined?
The GCC definition (Linux x86 anyway) is typedef unsigned long long int uint64_t;.
Re: Data Type uint64 can not be resolved [message #1732553 is a reply to message #1732323] Wed, 18 May 2016 08:35 Go to previous messageGo to next message
Gulam Helbig is currently offline Gulam HelbigFriend
Messages: 7
Registered: May 2016
Junior Member

Quote:
What isunsigned __INT64?

There is a define : #define __INT64 __int64
in the same file directly at the beginning. Whereas __int64 has no further definitions. For the ARM CC Compiler it is OK, I mean when I compile the code inside uvision IDE it compiles without errors and warnings.
Re: Data Type uint64 can not be resolved [message #1732597 is a reply to message #1732553] Wed, 18 May 2016 12:28 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The indexer likely doesn't know what __int64 is. You can get around this by defining it just for the indexer,

Some place before including stdint.h maybe in a special include say MyStdInt.h

#ifdef __CDT_PARSER__
#define __int64 int 
// or maybe
#define __int64
#endif
#include <stdint.h>

The preprocessor variable __CDT_PARSER__ is defined by the Indexer when it runs. It's a way to include things for the Indexer's benefit.

You could also try defining __int64 as a symbol on the project properties Paths and Symbols using the Symbols tab. I think that still works.

There are compiler defines being displayed in Preprocessor Include Paths, Macros etc. but there doesn't seem to be a way to add user defines. Or maybe there is,. I didn't try very hard.





[Updated on: Wed, 18 May 2016 12:36]

Report message to a moderator

Re: Data Type uint64 can not be resolved [message #1732599 is a reply to message #1732597] Wed, 18 May 2016 12:41 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
I just wonder what the configuration of the OP is, a cross-compilation, maybe?

The indexer needs help for the built-in definitions, if the compilation is not targeted for the host processor / OS.


--

Tauno Voipio
Previous Topic:"Link With Editor" not working in Project Explorer
Next Topic:properties-> c++ build not found
Goto Forum:
  


Current Time: Fri Apr 26 00:44:03 GMT 2024

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

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

Back to the top