Page 1 of 1 [ 3 posts ] 

Roxas_XIII
Veteran
Veteran

User avatar

Joined: 8 Jan 2007
Age: 33
Gender: Male
Posts: 3,217
Location: Laramie, WY

29 Dec 2011, 2:22 am

Ok, so right now I'm writing a C++ console application using the Code::Blocks IDE and the GNU compiler. However, I've run into a bit of a snag. Apparently the GNU compiler has the standard C++ header files, but they don't have the headers for TR1, which is a separate section of the library for processing regular expressions using the <regex> class.

I know that in the Visual Studio IDE for Windows I didn't have a problem with using <regex>, so after a bit of research I determined it wasn't because I had improper code, just that I didn't have the TR1 library. So my question is, what would be a suitable library to install to add support for regular expressions in C++ to the GNU compiler?

So far the best candidate I've found has been the Boost.Regex library here: www.boost.org

I'm looking for a library whose syntax and method names match as closely as possible to the TR1 expansion in Visual Studio, because I don't want to take the time to learn entirely new methods of using regular expressions. So far the Boost library has been the best match, but I'm having issues installing it properly. Oh, and FYI I'm using Ubuntu 10.10 for my OS.


_________________
"Yeah, so this one time, I tried playing poker with tarot cards... got a full house, and about four people died." ~ Unknown comedian

Happy New Year from WP's resident fortune-teller! May the cards be ever in your favor.


HalibutSandwich
Snowy Owl
Snowy Owl

User avatar

Joined: 1 Oct 2011
Gender: Male
Posts: 139
Location: On the hairy end.

29 Dec 2011, 3:32 am

tr1 is based on Boost isn't it? What install problems are you having?

Edit: Are you trying to install the Maverick packages or tarballs from Boost themselves? Several posts on Stackoverflow point to this PPA with the newest libs.
https://launchpad.net/~purplekarrot/+archive/ppa
It may end in dependency hell or break updates going from other posts though.


_________________
There's something inside me'n'I know it's good...
But understanding, it's misunderstood. - D.A.D.


Roxas_XIII
Veteran
Veteran

User avatar

Joined: 8 Jan 2007
Age: 33
Gender: Male
Posts: 3,217
Location: Laramie, WY

29 Dec 2011, 1:21 pm

I got the tarballs from SourceForge after following a link form the Boost page. However I'm not sure where I should install the directory. I tried installing it in usr/local and it failed, but I think that was because I wasn't logged in as root. So I'll try that next.


_________________
"Yeah, so this one time, I tried playing poker with tarot cards... got a full house, and about four people died." ~ Unknown comedian

Happy New Year from WP's resident fortune-teller! May the cards be ever in your favor.