building boost on vc7.1 with stlport

i first compiled (succesfully) stlport 4.6.2.
then i ran "bjam "-sTOOLS=vc7.1-stlport" install" and it failed compiling
the regex library.
then i manually went to the libs\regex\build folder and ran "nmake /f
vc7.1-stlport clean install" and it compiled the first thing ok and the 2nd
time around threw a LOT of linker errors (well, only ~49, but they're
stl-style-long :D). I set correctly the STLPORT_VERSION and the STLPORT_PATH
env vars, the tools were loaded ok, the INCLUDE env var had stlport's
include dir first... AND IT COMPILED OK the first one... here's a screenshot
of the last page of errors. please help me...
winstances.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport
) public: __thiscall _STL::basic_string
---------------------------------- Peace and love, Tweety mitea@sympatico.ca - tweety_04_01@users.sourceforge.net YahooID: tweety_04_01

I think this is a problem with mis-matched /Zc:wchar_t options - Boost is
normally built with that flag on, while STLPort is normally built with it
off. Depending on how you intend to build your own code, either rebuild
STLPort with /Zc:wchar_t or use:
bjam -sTOOLS=vc7.1-stlport -sBUILD="

Ok, I used bjam this time, and after I cleaned the binaries, I ran:
bjam -sTOOLS="vc7.1-stlport" -sBUILD="

I finally compiled the whole thing (by enabling wchar_t builtin support...)
and I ran into the same problem I had before: when I try to USE the regex
class in my code I get the following 2 linker errors:
html to mhtml.obj : error LNK2019: unresolved external symbol "public:
__thiscall boost::reg_expression

After poking atound in the regex regression test I found it doesn't link (build) cause it can't find "libboost_regex-vc71-s-1_31.lib". And it's right, I don't have that file... Does the main build process 'forget' to build part of the library? ---------------------------------- Peace and love, Tweety mitea@sympatico.ca - tweety_04_01@users.sourceforge.net YahooID: tweety_04_01

*bump*
Any suggestions?
Yes, just delete all occurrences of /Zc:wchar_t from the makefile and build from that. Oh, and if you have the *exact* sequence of events you used to try and build with bjam I would appreciate it, because I can't as yet reproduce that problem here. Thanks, John

Ok.
1. I built stlport
2. I set STLPORT_PATH and STLPORT_VERSION to their respective paths
3. I replaced every occurrence on /Zc:wchar_t with nothing (practically
deleting them) -- you should write this somewhere on your page...
4. I went to libs/regex/build
5. I ran nmake /f vc71-stlport.mak all (it went ok this time, no errors)
6. I ran nmake /f vc71-stlport.mak install (and it all went ok).
Now I make a simple win32 app and I include

Yes: the library 'libboost_regex-vc71-s-1_31.lib' is the following variant: Release runtime library. Single threaded. Static runtime library. *Not* an STLPort build. So: 1) your app is apparently not being built with STLPort in it's include path, and given the subject line I assume you want it to be. 2) STLPort does not support the single threaded runtime out the box, so you will have to switch to one of the multithreaded runtimes. 3) If you use a debug runtime, then I suspect you will also have to define __STL_DEBUG when building as that's the STLPort setting that Boost uses by default. John.

Hmm... In all the tests I ran I think I forgot to remove that library (I was
forcefully adding it for some reason).
Now I'm exactly where I was at the beginning: when I compile my program I
get these 2 linker errors:
html to mhtml error LNK2019: unresolved external symbol "public: __thiscall
boost::reg_expression

Then I'm stuck 'cos it works for me, I'm attaching a small project that you should be able to build OK, if the libraries were correctly built. Note: In debug mode you must select one of the multithreaded debug runtimes and define __STL_DEBUG, but you'll get a compile time error if you don't do that anyway. You can also define BOOST_LIB_DIAGNOSTIC to find out which lib file is being linked against. But my guess is that the lib's you built were not built against STLPort (incorrect STLPORT_PATH). John. ***************************************************************************** ** ** ** WARNING: This email contains an attachment of a very suspicious type. ** ** You are urged NOT to open this attachment unless you are absolutely ** ** sure it is legitmate. Opening this attachment may cause irreparable ** ** damage to your computer and your files. If you have any questions ** ** about the validity of this message, PLEASE SEEK HELP BEFORE OPENING IT. ** ** ** *****************************************************************************

I get the following errors and warnings:
C:\Boost\include\boost-1_31\boost\regex\v4\perl_matcher_recursive.hpp(403):
warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int',
possible loss of data
stlport_test error LNK2019: unresolved external symbol "public: __thiscall
boost::reg_expression
Just to test that I compiled against stlport I took it out of the include path and I got this: stlport_test fatal error LNK1104: cannot open file 'libboost_regex-vc71-mt-1_31.lib' So it is built against stlport. About boost not being built against stlport because of a wrong STLPORT_PATH variable, that isn't possible as it is checked at build-time by bjam. The only other thing I can mention is that I also applied the boost-1.31.0-regex-patch-20040503.zip patch... Seeing as noone can fix this, can someone tell me of another regex package besides microsoft's atl? I'm looking for something more perl-like... ---------------------------------- Peace and love, Tweety mitea@sympatico.ca - tweety_04_01@users.sourceforge.net YahooID: tweety_04_01

But I thought you used the makefile and not bjam? The makefile doesn't currently validate STLPORT_PATH.
All I can say is "it works for me". Did you try the sample project I sent you? BTW I should just add that VC7.1+STLPort is one of my regular regression tests on my machine here, and of course, you can always just add the source directly to your project in the IDE and define BOOST_REGEX_NO_LIB to suppress the auto-link code. John.

I tried both... I even downloaded the cvs build and tried with that (although it didn't compile the datetime lib at all and the regex dlls, everything else worked ok and I still got those 2 linker errors)
Yes, and I attached the 2 linker errors in my last message...
Yes, I think I'll try that... ---------------------------------- Peace and love, Tweety mitea@sympatico.ca - tweety_04_01@users.sourceforge.net YahooID: tweety_04_01

I can't belive it! I attached the cpp files to my project and added the #define macro you told me to add and I still got a ton of linker errors (more than before, but then again I use more stuff now)... All of them are in the reg_expression class... It's very weird... ---------------------------------- Peace and love, Tweety mitea@sympatico.ca - tweety_04_01@users.sourceforge.net YahooID: tweety_04_01

Right... I updated the cvs build again, build the regex library with the makefile and renamed the resulting libs (they were called _1.32 but the auto link header expected _1.31) and it seems to work now... All I can say is thank god and weird... ---------------------------------- Peace and love, Tweety mitea@sympatico.ca - tweety_04_01@users.sourceforge.net YahooID: tweety_04_01
participants (2)
-
John Maddock
-
tweety