Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:14 Go to next message
Michael Spertus is currently offline Michael Spertus
Messages: 78
Registered: July 2009
Member
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 09:44 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1963
Registered: July 2009
Senior Member
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?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: CDT can't analyze std::string and other typedefs [message #840738 is a reply to message #840610] Tue, 10 April 2012 13:06 Go to previous messageGo to next message
Michael Spertus is currently offline Michael Spertus
Messages: 78
Registered: July 2009
Member
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 14:42 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1963
Registered: July 2009
Senior Member
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)


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: CDT can't analyze std::string and other typedefs [message #840847 is a reply to message #840814] Tue, 10 April 2012 15:29 Go to previous message
Michael Spertus is currently offline Michael Spertus
Messages: 78
Registered: July 2009
Member
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: Mon Oct 20 21:12:19 GMT 2014

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

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