Hi all,

I am getting this error when try to build on solaris, using g++,  I am only using

Class shared_ptr

 

 

g++  -c  -I/opt/sfw/lib/g++-include -I/usr/local/include -I/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include -I/usr/local/boost_1_32_0 console_app.cpp
In file included from /usr/local/boost_1_32_0/boost/config.hpp:44,
                 from /usr/local/boost_1_32_0/boost/shared_ptr.hpp:17,
                 from console_app.cpp:7:
/usr/local/boost_1_32_0/boost/config/stdlib/sgi.hpp:29: Invalid token in _expression
In file included from /usr/local/boost_1_32_0/boost/config/platform/solaris.hpp:17,
                 from /usr/local/boost_1_32_0/boost/config.hpp:53,
                 from /usr/local/boost_1_32_0/boost/shared_ptr.hpp:17,
                 from console_app.cpp:7:
/usr/local/boost_1_32_0/boost/config/posix_features.hpp:51: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/posix_features.hpp:67: Invalid token in _expression
In file included from /usr/local/boost_1_32_0/boost/config.hpp:57,
                 from /usr/local/boost_1_32_0/boost/shared_ptr.hpp:17,
                 from console_app.cpp:7:
/usr/local/boost_1_32_0/boost/config/suffix.hpp:34: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:61: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:70: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:97: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:105: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:113: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:121: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:130: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:140: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:200: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:211: Invalid token in _expression
/usr/local/boost_1_32_0/boost/config/suffix.hpp:226: Invalid token in _expression
In file included from console_app.cpp:7:
/usr/local/boost_1_32_0/boost/shared_ptr.hpp:264: Invalid token in _expression
/usr/local/boost_1_32_0/boost/shared_ptr.hpp:271: Invalid token in _expression
make: *** [console_app.o] Error 1

 

 

my cpp file is

 

console_app.cpp

 

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

using namespace std;

using namespace boost;

 

class mytest
{
public:
 mytest()
 {

 }
 ~mytest()
 {
  bool b = true;
 }
};

 

int main()
{
   
map<int,shared_ptr<mytest> > m_map1;
shared_ptr<mytest> p(new mytest);

m_map1[1] = p;

  m_map1.clear();
 return 0;
}

 

Thanks,

Naeem

 

 
AIRCOM to present OSS, Planning & Optimization products and services at the IIR Performance Measurement Conference, April 4-7th 2005, Budapest. Visit us at Booth 12.

Disclaimer:

The information contained in this e-mail, including any attachments to it, is confidential and intended only for the person(s) to whom it is addressed. Any examination, distribution, disclosure, printing, or copying of this information, or reliance upon this information by any person other than the intended recipient(s) is strictly prohibited. If this e-mail has been misdirected and you are not the intended recipient, please notify the sender immediately and delete this e-mail from your system. The views and opinions contained in this transmission represent those of the author and do not necessarily reflect those of AIRCOM International. AIRCOM International may monitor incoming and outgoing e-mails. By replying to this message, you consent to this monitoring. This e-mail has been scanned by McAfee Group Shield prior to transmission. However, recipients are advised to apply their own antivirus detection measures to this e-mail and any attachments upon receipt. AIRCOM International does not accept liability for any damage or losses arising as a result of receiving this e-mail.