que estoy tratando de impulsar el uso de expresiones regulares dentro de mi programa de el problema se me sale este error ... el único paso de la instalación lo que hice fue agregar: "C: \ archivos de programa \ impulso \ boost_1_42" en el adicionales incluyen directorios ...LNK1104 error grave: no puede abrir archivo 'libboost_regex-vc90-mt-gd-1_42.lib'
estoy usando VS2008 ...
tratar de implementar esto:
#include <iostream>
#include <string>
#include <boost/regex.hpp>
using namespace std;
int main() {
std::string s, sre;
boost::regex re;
boost::cmatch matches;
while(true)
{
cout << "Expression: ";
cin >> sre;
if (sre == "quit")
{
break;
}
cout << "String: ";
cin >> s;
try
{
// Assignment and construction initialize the FSM used
// for regexp parsing
re = sre;
}
catch (boost::regex_error& e)
{
cout << sre << " is not a valid regular expression: \""
<< e.what() << "\"" << endl;
continue;
}
// if (boost::regex_match(s.begin(), s.end(), re))
if (boost::regex_match(s.c_str(), matches, re))
{
// matches[0] contains the original string. matches[n]
// contains a sub_match object for each matching
// subexpression
for (int i = 1; i < matches.size(); i++)
{
// sub_match::first and sub_match::second are iterators that
// refer to the first and one past the last chars of the
// matching subexpression
string match(matches[i].first, matches[i].second);
cout << "\tmatches[" << i << "] = " << match << endl;
}
}
else
{
cout << "The regexp \"" << re << "\" does not match \"" << s << "\"" << endl;
}
}
}
lo que parece ser el problema ? cualquier configuración adicional debe hacerse?
todavía mismo error ... 1> LINK: LNK1104 error fatal: no se puede abrir el archivo 'libboost_regex-vc90-mt-gd-1_42.lib' hizo exactamente lo que dijo u ... – kaycee
funciona bien .. Agregado al enlazador "C: \ Archivos de programa \ boost \ boost_1_42 \ stage \ lib \ libboost_regex-vc90-mt-gd-1_42.lib" – kaycee
'_HAS_ITERATOR_DEBUGGING' solo se aplica a las versiones de depuración. Sin embargo, con respecto a '_SECURE_SCL', ¿ha encontrado problemas al mezclar bibliotecas que lo tienen habilitado con bibliotecas que lo tienen deshabilitado? –