cannot find namespace boost?

Hi! When compiling my project using Boost 1.43 and Visual C++ 2010 Express I get the following: error C2653: 'boost' : is not a class or namespace name error C2143: syntax error : missing ';' before '<' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2238: unexpected token(s) preceding ';' where I am using boost::shared_ptr<Some_Class> Is this some simple newb mistake I am making? This is on a cmake-based project, which works just fine with boost 1.37, but there on the other hand I get a whole lot of warnings like this: "Unknown compiler version - please run the configure tests and report the results" which I interpret as Visual C++ 2010 being too new to be recognized by the older version of boost. Is this some major change in boost that I have missed? I am just using this shared_ptr, and I believe that it is only header-based, and I don't need to compile boost to use it? Is that wrong? best regards -- Andreas Ronnquist <gusnan@gusnan.se>

Did you double check that you have "#include <boost/shared_ptr.hpp>" _before_ the use? Is this the first error message? I don't have any problems with boost::shared_ptr from Boost 1.43 using Visual C++ 2010 (Professional). Did you try a trivial case like just: #include <boost/shared_ptr.hpp> int main(){ boost::shared_ptr<int> bloek; }

On Sat, 07 Aug 2010 05:05:06 +0200 Stefan van Kessel <van_kessel@freenet.de> wrote:
Did you double check that you have "#include <boost/shared_ptr.hpp>" _before_ the use? Is this the first error message? I don't have any problems with boost::shared_ptr from Boost 1.43 using Visual C++ 2010 (Professional). Did you try a trivial case like just: #include <boost/shared_ptr.hpp> int main(){ boost::shared_ptr<int> bloek; }
I just managed to get it working - copied the boost folder again to my include folder for cmake , and now I get neither warnings nor errors during compile. Anyway, thanks for your input. -- Andreas Ronnquist <gusnan@gusnan.se>
participants (2)
-
Andreas Ronnquist
-
Stefan van Kessel