Search code examples
c++mysqleclipseboosteclipse-cdt

eclipse-cdt boost\shared_ptr.hpp: no such file in directory, but its part of the include files


I'm new to using MySQL and Boost, and the Q&A in this site have been really helpful so far. However, I have not been able to resolve the following problem. I am using the 'complete example 1' from the 'mysql connector/c++ developer guide'(as a test). Though I have included the boost files in my project I still get the following fatal error: boost/shared_ptr.hpp: No such file or directory but the this file is in the boost folder. Have I missed out something I should have done? I have linked a screenshot of my eclipse-cdt showing the error and the missing header file on the left.

even though mysql_connection.h header file has 2 include lines,

#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>

only one of them show up as an error. https://drive.google.com/open?id=0BxPDShOqHnvvNERua0NRcTk2Vzg

Your help is much appreciated. Thank you


Solution

  • I just had to change the include folder for boost from C:\boost_1_63_0\boost to C:\boost_1_63_0 as the code was looking inside the boost folder.