spirit 1.6.0 stlport 4.6.2 msvc6

P

programmer_pete

I am trying to switch to STLPort 4.6.2 from the MSVC STL.
My project uses Spirit 1.6.0 and MSVC++ 6.

I have configured STLPort as follows:
#define _STLP_NO_OWN_IOSTREAMS 1
#define _STLP_USE_OWN_NAMESPACE 1
#define _STLP_REDEFINE_STD 1

In other words, STLPort is configured to used MSVC's iostreams.

I am running into a problem with BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE

I get the error:

c:\boost\boost\spirit\core\primitives\impl\primitives.ipp(127) : error
C2059: syntax error : '<'

---- excerpt from primitives.ipp lines 125-132 ----
template <typename CharT>
inline typename
-> BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE::char_traits<CharT>::int_type
to_int_type(CharT c)
{
return BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE
::char_traits<CharT>::to_int_type(c);
}
---- end excerpt ----

Does anyone have any advice on how to fix this?

By the way, I tried adding warning 4103 to the disabled errors in
_msvc_warnings_off.h (STLPort), but I still get a bunch of them. They
do go away if I wack pragma warning( pop ) from epilog.h, but that
defeats the purpose....

Thanks, "Pete"
 
P

programmer_pete

I have changed my approach. I now have

#define _STLP_NO_OWN_NAMESPACE

and do not define the things I did before. This configures STLPort to
use its own iostreams and put them in the std:: namespace. I think that
Spirit will build this way.

This means I need to build the STLPort library. I tried making an MSVC
project and building in the environment, and that didn't work. The
first error is 'char_traits' : undeclared identifier. I tried using the
command line makefiles, but I don't have any experience with those. The
first error I get is
...\\stlport\stl/_hashtable.h(110) : error C2146: syntax error : missing
';' before identifier 'iterator_category'
...\\stlport\stl/_hashtable.h(137) : see reference to class template
instantiation
'_STLP_STD::_Ht_iterator<_Val,_Traits,_Key,_HF,_ExK,_EqK,_All>' being
compiled.

I know these are really "handholding" questions, but can anyone explain
how to build and use this thing? I find the installation instructions
quite vague.


Thanks, "Pete"
 
P

programmer_pete

Finally, I can build the library. The configuration is to define

#define _STLP_USE_OWN_NAMESPACE 1
#define _STLP_REDEFINE_STD 1

and (of course) do not define _STLP_NO_OWN_IOSTREAMS.

I can also build and run my application.

Thank you all for your indulgence,

"Pete"
P.S. One additional gotcha: make sure that you do not define /J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top