Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Symbol 'std' could not be resolved Issue(Getting the error in the title)
Symbol 'std' could not be resolved Issue [message #1790350] Fri, 08 June 2018 13:40 Go to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
CDT parser is showing the following error for a c++ code
Symbol 'std' could not be resolved Issue

I know using namespace is not very good coding practice from what I read
in the forums but I am importing code files other people have written into eclipse and I cannot change what they have coded which is why I am stuck trying to resolve this issue.

#include <iostream>
using namespace std;

int main()
{
	return 0;
}


I have installed MINGW32 and configured all includes and Paths as best as I know.
MINGW/lib/gcc/mingw32/6.3.0/include/c++ is in the path.
I tried adding -std=c++11 to compiler options but that did not do anything
I tried closing project and reopening as well as deleting the error in the Problems view as well as Rebuild/Freshen/Update.

My eclipse version is
Eclipse IDE for C/C++ Developers
Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200

I am at a loss how to resolve this.
Any help as to why the CDT parser cannot resolve this would be highly appreciated. Thanks,
Amish
Re: Symbol 'std' could not be resolved Issue [message #1790364 is a reply to message #1790350] Fri, 08 June 2018 15:30 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You haven't enabled a builtin provider in
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Providers tab
Pick the builtin provider for MinGW
Pay attention to the selected configuration, too.
More info: https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_general_sd_providers.htm&cp=13_4_7_0_4_6_1

It's strange that you didn't get an error on <iostream>
Like the question marks below when the builtin provider is disabled
index.php/fa/33052/0/
Did you simply ignore it?

You should read some of the documentation before continuing
Start: http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Fconcepts%2Fcdt_c_before_you_begin.htm
Read about the indexer
here: https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Fconcepts%2Fcdt_c_indexer.htm&cp=13_2_9_0
and here: https://help.eclipse.org/oxygen/topic/org.eclipse.cdt.doc.user/tasks/cdt_t_sd.htm?cp=13_3_7

[Updated on: Fri, 08 June 2018 15:41]

Report message to a moderator

Re: Symbol 'std' could not be resolved Issue [message #1790377 is a reply to message #1790364] Fri, 08 June 2018 18:52 Go to previous messageGo to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
Provider is all set. I have many other c++ code files that are being parsed correctly. Only the namespace std is the issue.
index.php/fa/33055/0/

[Updated on: Fri, 08 June 2018 20:15]

Report message to a moderator

Re: Symbol 'std' could not be resolved Issue [message #1790387 is a reply to message #1790377] Sat, 09 June 2018 03:06 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Then it's not working properly.
Select the builtin provider then select Allocate console on the Console View
at the bottom of the dialog
You may need to unselect the builtin provider and reselect it before pressing Apply
You may also need to rebuild the index

You should get something like this.
If not try running the command in a windows command terminal.
index.php/fa/33061/0/
You should also see entries under the builtins in the Entries tab.
index.php/fa/33063/0/

And in Project View under one of the include paths
Note the entry for std in <iostream>
index.php/fa/33064/0/

Works for me
index.php/fa/33062/0/

[Updated on: Sat, 09 June 2018 03:29]

Report message to a moderator

Re: Symbol 'std' could not be resolved Issue [message #1790468 is a reply to message #1790387] Mon, 11 June 2018 12:41 Go to previous messageGo to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
I checked everything you showed in your post and I have the same thing. I attached mingcw CDT compiler settings output
Could it be my computer is a 64bit OS version using ming32. Something like that.
I am at a loss here.
Re: Symbol 'std' could not be resolved Issue [message #1790469 is a reply to message #1790468] Mon, 11 June 2018 12:52 Go to previous messageGo to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
One thing I am noticing is yours indicate that
#define __cplusplus 199711L
while mine is
#define __cplusplus 201402L

Could that make a difference. How do I change that exactly.
Re: Symbol 'std' could not be resolved Issue [message #1790470 is a reply to message #1790469] Mon, 11 June 2018 12:56 Go to previous messageGo to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
ok so I confirmed that changing the GCC compiler setting to 199711L did not do anything
Re: Symbol 'std' could not be resolved Issue [message #1790473 is a reply to message #1790470] Mon, 11 June 2018 13:05 Go to previous messageGo to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
Hmm I tried to create a new c/c++ Managed Build project and choose the default hello world code and that seems to work fine.
Re: Symbol 'std' could not be resolved Issue [message #1790494 is a reply to message #1790473] Mon, 11 June 2018 19:53 Go to previous messageGo to next message
Amish Rughoonundon is currently offline Amish RughoonundonFriend
Messages: 9
Registered: July 2016
Junior Member
After many trial and error I found out that files that I was inlcuding were clashing with the c++ std library.
I have embedded source code required for code targetting a dsp analog devices adsp-21371 so I was including the files that came with the dsp compile tool.

Two of the files that was included is attached and it seems to have been clashing with the std library iostream. I am wondering if I should have defined
_HAS_NAMESPACE maybe. I am not sure exactly how to resolve this issue
Amish
  • Attachment: iostream
    (Size: 0.67KB, Downloaded 362 times)
  • Attachment: iostream.h
    (Size: 0.61KB, Downloaded 276 times)
Re: Symbol 'std' could not be resolved Issue [message #1818688 is a reply to message #1790494] Mon, 23 December 2019 09:56 Go to previous message
Ibrahim Yesilay is currently offline Ibrahim YesilayFriend
Messages: 1
Registered: December 2019
Junior Member
Hey I had the same problem! I found out that if you have leftside open 2 project same time!! You can use namespace just for the first one!! So delete all other project on workspace sidebar and you wil be able to use again namespace!
Previous Topic:Breakpoints don't work
Next Topic:Escape sequences not recognized
Goto Forum:
  


Current Time: Fri Apr 19 23:47:49 GMT 2024

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

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

Back to the top