Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Boost types cannot be resolved
Boost types cannot be resolved [message #1703186] Wed, 29 July 2015 08:14 Go to next message
Javier V. Gomez is currently offline Javier V. GomezFriend
Messages: 1
Registered: July 2015
Junior Member
I know this is a problem many people had in the past, but I am not able to solve it.

I am using, for instance, boost::recursive_mutex in both .hpp and .cpp files of my code. I am including #include <boost/thread/locks.hpp> in the .hpp file and it does not complain. However, in the cpp file a red square appears next to the scroll bar saying " boost::recursive_mutex::scoped_lock type could not be resolved". However the code compiles properly.

Analogously, in the cpp I am using algo boost::bind and including #include <boost/bind.hpp>. In this case it complains about unresolved inclusion and the 'same type could not be resolved message'.

I have added /usr/include/boost to paths and symbols and the project is generated from CMake.

Any help is appreciated!
Re: Boost types cannot be resolved [message #1703506 is a reply to message #1703186] Sat, 01 August 2015 17:12 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I'm no expert by my guess is the index needs rebuilt (right click on the project in the project explorer/navigator then select Index->Rebuild) and if that doesn't fix it then the include paths may need to be added to the project under "project->properties->C/C++ General->Processor include paths, macros, etc." or "project->propertie->C/C++ General->Paths and Symbols".

You could also explicitly place the definitions in the marked error code and surround it with

#ifdef __CDT_PARSER__
:
:
#endif

which will hide if from the compiler. Sometimes this appears to be the only way.

You might also look at how the indexer has been configured. There's too much detail to go into but I found that, for me, the cache limits were too small. The indexer options are under Window->Preferences->Indexer.

http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_indexer_preference.html

Disabling Code Analysis might work too but I would find that unpalatable.

[Updated on: Sat, 01 August 2015 17:32]

Report message to a moderator

Previous Topic:Eclipse CDT Juno, C++11, GCC 4.8 on OS X Lion and MLion
Next Topic:Problem with GDB ( OS X )
Goto Forum:
  


Current Time: Mon Sep 09 02:17:49 GMT 2024

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

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

Back to the top