[C++] Regular Expression portable library

Started by
10 comments, last by paulecoyote 18 years, 8 months ago
Hi, I use Visual C++ 7.1, and I'm looking for a portable Regular Expressions library that I can use as a dll but recompile it myself to Multithreaded Debug Dll and Multithreaded Dll... rather then just Multithreaded. Boost regex seems to have its own mak file system that installs stuff to system directories - I'd prefer to have something that was a bit less intrusive. I could not find the Boost regex solution file (probably missed it?). In the meantime I found something else interesting but could not easily turn that in to a dll http://research.microsoft.com/projects/greta/, which is far from ideal, but will do for the moment. It claims to be better then boost too, though I wish they had written it in a dll friendly way - there's so many different classes and dependencies etc that could need exporting it would be nightmare trying to try and get it dllexport'ing properly. Anyone know any lightweight independant free for use in closed-source C++ libraries that implement Regular Expressions and let me easily set the output file type?
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Advertisement
As indicated in the installation instructions on the web site, if you do bjam -sTOOLS=vc-7_1 install, then all the Boost library files will be copied to C:\Boost by default (you can change that with the --prefix option, IIRC). They will not be installed to "system" directories.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Or you can just add the files in boost_1_32_0/libs/regex/src/ to your project. If you take that approach you should probably uncomment the #define BOOST_ALL_NO_LIB in the boost/config/user.hpp file.
Quote:Original post by Fruny
As indicated in the installation instructions on the web site, if you do bjam -sTOOLS=vc-7_1 install, then all the Boost library files will be copied to C:\Boost by default (you can change that with the --prefix option, IIRC). They will not be installed to "system" directories.


well I suppose it depends what you think of as "system", I should have probably said "the common visual studio lib directory" or something
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
And if I remember correctly, "bjam -sTOOLS=vc-7_1 stage" will place everything in an entirely separate directory for you to do as you please with. :) (Can you tell we're Boost lovers here? Hehe.)
{[JohnE, Chief Architect and Senior Programmer, Twilight Dragon Media{[+++{GCC/MinGW}+++{Code::Blocks IDE}+++{wxWidgets Cross-Platform Native UI Framework}+++
There's also xpressive, which is written by the same guy (Eric Niebler) who wrote GRETA and is supposed to be quite fast. It doesn't require building either; like most of Boost it's header-only.
Thanks for all the replies. To be honest I'm not really so at home right now with the command line tools and make files, years of borland then visual studio have spoiled me... and I'm rusty in the ways of the make file.

I will RTFM, I was just watching what nmake was doing while installing and it looked like it was using a compiler option I did not want (/MD rather then /MDd for example). It's easy to say RTFM if you know where to look!

Ogre seems to like the whole /MDd thing rather then /MD and /MT rather then /MD - I've noticed I get strange STL errors if I attempt to mix the types of C++ code generation runtime library.

jdhardy > thanks for the link to another regex library, that does look interesting.

sicrane > really it would be that easy? Cool I might well give that a shot - I was kind of hoping it would be possible to just do that.

Anyway, on to less interesting daytime type things [wink]
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Looking at the boost implementation of regex it seems to have a complex web of interdependencies with other members of the boost library, I cannot just add everything to a solution [sad]

I just want something lightweight I can recompile as a library with my own settings!

Gonna have a look at http://boost-sandbox.sourceforge.net/vault/index.php?directory=eric_niebler - but as it's another boost thing I expect I'm going to have to do all that make file bollocks stuff.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
meh, dont worry I'm going to persevere with the boost stuff I think anyway, I'm just having *another* bad day and I just wanted something to be *simple*
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
ah right, it seems to generate about every compiler option anyway with the make file stuff. [rolleyes]

so I guess I take it all back. Giving boost:regex another shot.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.

This topic is closed to new replies.

Advertisement