Linking STLPort 4.3 and Boost with VC7.0
How do i get theese three things to work together nicely? I cannot find any help for this (and i know it had to be asked before). //#include <iostream> #include <boost\spirit.hpp> int main () { boost::spirit::rule<> p = *(boost::spirit::real_p); return 0; } I get linker errors if i uncomment the iostream include STL Port is built to use its own streams. Works fine in other examples not using boost. I looked through the boost user config but didnt see anything relavant to throw boost a bone that im using STL Port. Any help would greatly be appreciated! Ray Hilton
"Ray" <RayHilton_64@hotmail.com> writes:
How do i get theese three things to work together nicely? I cannot find any help for this (and i know it had to be asked before).
//#include <iostream> #include <boost\spirit.hpp> int main () { boost::spirit::rule<> p = *(boost::spirit::real_p); return 0; } I get linker errors if i uncomment the iostream include
STL Port is built to use its own streams. Works fine in other examples not using boost. I looked through the boost user config but didnt see anything relavant to throw boost a bone that im using STL Port.
Any help would greatly be appreciated!
Perhaps you need to link to an STLPort library? If you want more than a guess, you should post one or two of the link errors you're getting. -- Dave Abrahams Boost Consulting www.boost-consulting.com
"David Abrahams" <dave@boost-consulting.com> wrote in message news:un0bw4891.fsf@boost-consulting.com...
"Ray" <RayHilton_64@hotmail.com> writes:
How do i get theese three things to work together nicely? I cannot find any help for this (and i know it had to be asked before).
//#include <iostream> #include <boost\spirit.hpp> int main () { boost::spirit::rule<> p = *(boost::spirit::real_p); return 0; } I get linker errors if i uncomment the iostream include
STL Port is built to use its own streams. Works fine in other examples not using boost. I looked through the boost user config but didnt see anything relavant to throw boost a bone that im using STL Port.
Any help would greatly be appreciated!
Perhaps you need to link to an STLPort library?
If you want more than a guess, you should post one or two of the link errors you're getting.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Actually, linker errors was incorrect. I get c:\Documents and Settings\Ray Hilton\My Documents\Development\boost_1_30_0\boost_1_30_0\boost_1_30_0\boost\shared_pt r.hpp(284): error C2039: 'type_info' : is not a member of '_STL' Thats with all the default settings for a empty console program, except multi-threaded debug runtime library and using the code above. I was getting some linker errors after trying various defines like _STLP_NO_OWN_IOSTREAMS Thanks, Ray Hilton
"Ray Hilton" <RayHilton_64@hotmail.com> writes:
"David Abrahams" <dave@boost-consulting.com> wrote in message news:un0bw4891.fsf@boost-consulting.com...
"Ray" <RayHilton_64@hotmail.com> writes:
How do i get theese three things to work together nicely? I cannot find any help for this (and i know it had to be asked before).
//#include <iostream> #include <boost\spirit.hpp> int main () { boost::spirit::rule<> p = *(boost::spirit::real_p); return 0; } I get linker errors if i uncomment the iostream include
STL Port is built to use its own streams. Works fine in other examples not using boost. I looked through the boost user config but didnt see anything relavant to throw boost a bone that im using STL Port.
Any help would greatly be appreciated!
Perhaps you need to link to an STLPort library?
If you want more than a guess, you should post one or two of the link errors you're getting.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Actually, linker errors was incorrect. I get c:\Documents and Settings\Ray Hilton\My Documents\Development\boost_1_30_0\boost_1_30_0\boost_1_30_0\boost\shared_pt r.hpp(284): error C2039: 'type_info' : is not a member of '_STL'
Thats with all the default settings for a empty console program, except multi-threaded debug runtime library and using the code above.
Someone recently had this problem who was mixing old-style (e.g. <iostream.h>) and new-style (e.g. <iostream>) headers in the same project. You might try preprocessing your code and looking for suspicious #includes. -- Dave Abrahams Boost Consulting www.boost-consulting.com
Someone recently had this problem who was mixing old-style (e.g. <iostream.h>) and new-style (e.g. <iostream>) headers in the same project. You might try preprocessing your code and looking for suspicious #includes.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Thanks for the tips but how do i go about "..preprocessing your code and looking for suspicious #includes."? I never debugged the preprocess level before. Argh my head hurts ;) Thanks, Ray
"Ray" <RayHilton_64@hotmail.com> writes:
Someone recently had this problem who was mixing old-style (e.g. <iostream.h>) and new-style (e.g. <iostream>) headers in the same project. You might try preprocessing your code and looking for suspicious #includes.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Thanks for the tips but how do i go about "..preprocessing your code and looking for suspicious #includes."? I never debugged the preprocess level before.
Invoke your compiler with -E instead of -c (or /E instead of /c) and look at the #include lines for the names of old-style headers. -- Dave Abrahams Boost Consulting www.boost-consulting.com
Fixed it now. STLports <typeinfo> seems to be defunct, not injecting type_info to namespace _STL properly. Which is what spirit wants to include. STLPorts <typeinfo.h> however does. <typeinfo> won't do anything if <typeinfo.h> was already included. I just included <typeinfo.h> first. Hopefully, that hack don't blow up one day :) Ray
participants (3)
-
David Abrahams
-
Ray
-
Ray Hilton