Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT can't analyze std::string and other typedefs
CDT can't analyze std::string and other typedefs [message #840021] Mon, 09 April 2012 11:14 Go to next message
Eclipse UserFriend
If I have "std::string s; cout << s.size();" Code analysis gives me an error that size() could not be resolved. The same is true with methods for all my typedefs (not just basic_string<char>). Does code analysis really have this limitation? If not, what am I doing wrong?

Thanks,

Mike
Re: CDT can't analyze std::string and other typedefs [message #840610 is a reply to message #840021] Tue, 10 April 2012 05:44 Go to previous messageGo to next message
Eclipse UserFriend
Quote:
"std::string s; cout << s.size();"

This works for me. What happens when you put the the cursor on size() and then hit F3?
Re: CDT can't analyze std::string and other typedefs [message #840738 is a reply to message #840610] Tue, 10 April 2012 09:06 Go to previous messageGo to next message
Eclipse UserFriend
Axel Mueller wrote on Tue, 10 April 2012 05:44
Quote:
"std::string s; cout << s.size();"

This works for me. What happens when you put the the cursor on size() and then hit F3?

Could not find symbol 'size' in index
Re: CDT can't analyze std::string and other typedefs [message #840814 is a reply to message #840738] Tue, 10 April 2012 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Michael Spertus wrote on Tue, 10 April 2012 15:06
Axel Mueller wrote on Tue, 10 April 2012 05:44
Quote:
"std::string s; cout << s.size();"

This works for me. What happens when you put the the cursor on size() and then hit F3?

Could not find symbol 'size' in index

Rebuild the index (Project properties->Index)
Re: CDT can't analyze std::string and other typedefs [message #840847 is a reply to message #840814] Tue, 10 April 2012 11:29 Go to previous message
Eclipse UserFriend
I figured out the problem by enabling all the debug/indexer options. Some include files were not properly being resolved. Sorry for the inconvenience.

Mike
Previous Topic:Windows SDK support status
Next Topic:Helios CDT package will not install under centOS 6.2
Goto Forum:
  


Current Time: Tue Jun 17 17:38:20 EDT 2025

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

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

Back to the top