problem mit boost und qt
Verfasst: 2. Februar 2009 19:40
Hallo zusammen,
ich habe mal versucht die boost library einzubinden.
da drin habe ich dann die <boost/regex.hpp> bibliothek angesprochen.
doch der mingw compiler bringt mir da nur fehler.
hier sit mal die compiler ausgabe.
hat da jemand ne idee, was das sein könnte?
so binde ich das ganze ein:
ich habe mal versucht die boost library einzubinden.
da drin habe ich dann die <boost/regex.hpp> bibliothek angesprochen.
doch der mingw compiler bringt mir da nur fehler.
hier sit mal die compiler ausgabe.
hat da jemand ne idee, was das sein könnte?
Code: Alles auswählen
Starting: C:/Qt/QtCreator/mingw/bin/mingw32-make.exe debug -w
mingw32-make: Entering directory `C:/Dokumente und Einstellungen/anno/Desktop/sql'
C:/Qt/QtCreator/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Dokumente und Einstellungen/anno/Desktop/sql'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\..\Qt\QtCreator\qt\include\QtCore" -I"..\..\..\..\Qt\QtCreator\qt\include\QtCore" -I"..\..\..\..\Qt\QtCreator\qt\include\QtGui" -I"..\..\..\..\Qt\QtCreator\qt\include\QtGui" -I"..\..\..\..\Qt\QtCreator\qt\include\QtSql" -I"..\..\..\..\Qt\QtCreator\qt\include\QtSql" -I"..\..\..\..\Qt\QtCreator\qt\include" -I"c:\Qt\QtCreator\qt\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\QtCreator\qt\mkspecs\win32-g++" -o debug\pwdcrypt.o pwdcrypt.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\sql.exe debug/main.o debug/mainwindow.o debug/pwdcrypt.o debug/core_func.inc.o debug/moc_mainwindow.o -L"c:\Qt\QtCreator\qt\lib" -lmingw32 -lqtmaind -lQtSqld4 -lQtGuid4 -lQtCored4
debug/pwdcrypt.o: In function `ZSt17__is_null_pointerIN9__gnu_cxx17__normal_iteratorIPKcSsEEEbT_':
C:/Qt/QtCreator/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_iterator.h:(.text$_ZN5boost11regex_matchIPKcSaINS_9sub_matchIS2_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SA_RNS_13match_resultsISA_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsE[bool boost::regex_match<char const*, std::allocator<boost::sub_match<char const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::match_results<char const*, std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x9a): undefined reference to `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match()'
C:/Qt/QtCreator/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_iterator.h:(.text$_ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)]+0x22): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
mingw32-make[1]: Leaving directory `C:/Dokumente und Einstellungen/Volker Obhof/Desktop/sql'
mingw32-make: Leaving directory `C:/Dokumente und Einstellungen/Volker Obhof/Desktop/sql'
C:/Qt/QtCreator/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_iterator.h:(.text$_ZN5boost9re_detail12perl_matcherIPKcSaINS_9sub_matchIS3_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC1ES3_S3_RNS_13match_resultsIS3_S6_EERKNS_11basic_regexIcSA_EENS_15regex_constants12_match_flagsES3_[boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)]+0xec): undefined reference to `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\sql.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project sql
When executing build step 'Make'
Code: Alles auswählen
#include <boost/regex.hpp>
#include <boost/algorithm/string.hpp>
#include <cstring>
using namespace std;
using namespace boost;
void pruefe(string dt) {
const char *c_dt;
const string srch_patt = "^\\d{4}\\.\\d{2}\\.\\d{2} \\d{2}:\\d{2}:\\d{2}$";
const regex pattern(srch_patt);
dt = trim_copy(dt);
c_dt = dt.c_str();
if(regex_match(c_dt, pattern) == true) {
mmysqldt = dt;
mmysqldt_chk = true;
}
else {
mmysqldt_chk = false;
}
}