boost::regex
I didn't build all the boost libraries because I find it easier (although the compile times are longer) to just include the header files of what I need from the boost libraries.
Am I right in thinking that the regex library is an actual library and I need to compile it as such to use the boost regular expression parsing?
Regex needs some object files. You can either use bjam, or add the files directily to your project, though the latter approach may take some massaging of the config files.
I thought that I would get an actual library to use, since VC++ 2005 express keeps complaining that it can't open "libboost_regex-vc80-mt-sgd-1_33_1.lib".
After much compiling by boost jam, I have a whole lot of object files and lib files for a whole bunch of stuff. Except for regex.
Am I able to just link to the object files? Or do I have to compile the regex object files to a library somehow?
After much compiling by boost jam, I have a whole lot of object files and lib files for a whole bunch of stuff. Except for regex.
Am I able to just link to the object files? Or do I have to compile the regex object files to a library somehow?
Its a shame that nobody seems able to help you. If only the boost comunity provided some means to get help directly from people that specialize in boost issues...perhaps some sort of list where one could mail questions.
CM
CM
Quote:Original post by Conner McCloud
Its a shame that nobody seems able to help you. If only the boost comunity provided some means to get help directly from people that specialize in boost issues...perhaps some sort of list where one could mail questions.
CM
I think you are hinting to the OP that he try the boost mailing lists...but I can't tell from the text. Here are the relevant links:
http version
news version
Just a few points about boost and linking in general.
1. When you start using a new library, or even a new part of a library you are familiar with, review the instructions: http://www.boost.org/more/getting_started.html contains all of the answers to your question and more. Don't forget to pay special attention to the instructions relating to your configuration (platform and compiler) http://www.boost.org/tools/build/v1/vc-8_0-tools.html
2. If you've followed the instructions on the boost webpage, then it's possible that your project or IDE settings aren't configured correctly (do they point to the boost include and library directories?)
Boost, like all c/c++ libraries either need to be linked to or they don't - there is no maybe or optional linking. The only time you don't need to link a library in is when the library is header only. Large parts of boost fall into this category. Don't fall into the trap of thinking boost is 'one big library'.
Don't forget that if you do need to link to a library, you will need to modify your build system to do this. The only exception to this is when linking is specified implicitly in the source - for example with compiler specific pragmas. Most boost libraries (including boost::regex) which can be linked to fall into this category, but AFAIK only with the Microsoft compilers.
1. When you start using a new library, or even a new part of a library you are familiar with, review the instructions: http://www.boost.org/more/getting_started.html contains all of the answers to your question and more. Don't forget to pay special attention to the instructions relating to your configuration (platform and compiler) http://www.boost.org/tools/build/v1/vc-8_0-tools.html
2. If you've followed the instructions on the boost webpage, then it's possible that your project or IDE settings aren't configured correctly (do they point to the boost include and library directories?)
Boost, like all c/c++ libraries either need to be linked to or they don't - there is no maybe or optional linking. The only time you don't need to link a library in is when the library is header only. Large parts of boost fall into this category. Don't fall into the trap of thinking boost is 'one big library'.
Don't forget that if you do need to link to a library, you will need to modify your build system to do this. The only exception to this is when linking is specified implicitly in the source - for example with compiler specific pragmas. Most boost libraries (including boost::regex) which can be linked to fall into this category, but AFAIK only with the Microsoft compilers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement