
Holger Bast wrote:
--===============0292832754== Content-Type: multipart/alternative; boundary="----=_Part_3129_20232071.1202996981254"
------=_Part_3129_20232071.1202996981254 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi All,
- I have built STL5.1.4 with VC8.
- boost against stlport with the following command -> make - fvc8-stlport.mak
*It created all the necessary libs and dlls. *
I have defined the following in my application.
*#define __STL_DEBUG #define BOOST_REGEX_DYN_LINK * But I am still getting the following linker errors. Any one can help me with these errors ?
*Appreciate your help in advance*
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::match_results
> ::~match_results
> >(void)" (__imp_??1?$match_results@ PBDV?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@@boost@@QAE@XZ) referenced in function "public: static bool __cdecl ExprEvaluator::doesStringMatchRegExpr(char const *,class boost::basic_regex >)" (?doesStringMatchRegExpr@ExprEvaluator@@ SA_NPBDV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@@Z) ExprEvaluator.obj Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::match_results > ::match_results > >(class stlp_std::allocator > const &)" (__imp_??0?$match_results@ PBDV?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@@boost@@QAE@ABV ?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@@Z) referenced in function "public: static bool __cdecl ExprEvaluator::doesStringMatchRegExpr(char const *,class boost::basic_regex >)" (?doesStringMatchRegExpr@ExprEvaluator@@ SA_NPBDV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@@Z) ExprEvaluator.obj Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::re_detail::perl_matcher >,struct boost::regex_traits >::~perl_matcher >,struct boost::regex_traits >(void)" (__imp_??1?$perl_matcher@PBDV?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@ U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@ QAE@XZ) referenced in function "bool __cdecl boost::regex_match ,char,struct boost::regex_traits (char const *,char const *,class boost::match_results > > &,class boost::basic_regex > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@PBDV?$allocator@U ?$sub_match@PBD@boost@@@stlp_std@@DU?$regex_traits@DV?$w32_regex_traits@ D@boost@@@boost@@@boost@@YA_NPBD0AAV?$match_results@PBDV?$allocator@ U?$sub_match@PBD@boost@@@stlp_std@@@0@ABV?$basic_regex@DU?$regex_traits@DV ?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z) ExprEvaluator.obj Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall boost::re_detail::perl_matcher >,struct boost::regex_traits >::match(void)" (__imp_?match@?$perl_matcher@PBDV?$allocator@U?$sub_match@PBD@boost @@@stlp_std@@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@ re_detail@boost@@QAE_NXZ) referenced in function "bool __cdecl boost::regex_match >,char,struct boost::regex_traits >(char const *,char const *,class boost::match_results > > &,class boost::basic_regex > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@ PBDV?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@DU?$regex_traits@DV ?$w32_regex_traits@D@boost@@@boost@@@boost@@YA_NPBD0AAV?$match_results@PBDV ?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@@0@ABV?$basic_regex@ DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@ regex_constants@0@@Z) ExprEvaluator.obj Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall boost::re_detail::perl_matcher >,struct boost::regex_traits >::perl_matcher >,struct boost::regex_traits >(char const *,char const *,class boost::match_results > > &,class boost::basic_regex > const &,enum boost::regex_constants::_match_flags,char const *)" (__imp_??0?$perl_matcher@PBDV?$allocator@U?$sub_match@PBD@boost@@@stlp_std@@ U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@ QAE@PBD0AAV?$match_results@PBDV?$allocator@U?$sub_match@PBD@boost @@@stlp_std@@@2@ABV?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@ D@boost@@@boost@@@2@W4_match_flags@regex_constants@2@0@Z) referenced in function "bool __cdecl boost::regex_match >,char,struct boost::regex_traits >(char const *,char const *,class boost::match_results > > &,class boost::basic_regex > const &,enum boost::regex_constants::_match_flags)" (??$regex_match@PBDV?$allocator@U ?$sub_match@PBD@boost@@@stlp_std@@DU?$regex_traits@DV?$w32_regex_traits@ D@boost@@@boost@@@boost@@YA_NPBD0AAV?$match_results@PBDV?$allocator@ U?$sub_match@PBD@boost@@@stlp_std@@@0@ABV?$basic_regex@DU?$regex_traits@DV ?$w32_regex_traits@D@boost@@@boost@@@0@W4_match_flags@regex_constants@0@@Z) ExprEvaluator.obj thanks & regards Srinivas Chamarthi
------=_Part_3129_20232071.1202996981254 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi All,<br><br><ul><li>I have built STL5.1.4 with VC8. </li></ul><ul><li>bo= Path: news.gmane.org!not-for-mail From: Holger Bast
Newsgroups: gmane.comp.lib.boost.user Subject: getline from boost::iostream::filtering_streambuf Date: Thu, 14 Feb 2008 08:40:11 +0100 Lines: 26 Approved: news@gmane.org Message-ID: <47B3F05B.9090702@mpi-inf.mpg.de> Reply-To: boost-users@lists.boost.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202978022 7906 80.91.229.12 (14 Feb 2008 08:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Feb 2008 08:33:42 +0000 (UTC) Cc: Holger Bast To: Boost users Original-X-From: boost-users-bounces@lists.boost.org Thu Feb 14 09:34:02 2008 Return-path: Envelope-to: yg-boost-users@m.gmane.org Original-Received: from wowbagger.osl.iu.edu ([129.79.245.252]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPZXd-0000kR-SV for yg-boost-users@m.gmane.org; Thu, 14 Feb 2008 09:34:02 +0100 Original-Received: from wowbagger.osl.iu.edu (localhost [127.0.0.1]) by wowbagger.osl.iu.edu (Postfix) with ESMTP id AD17B2F82CB; Thu, 14 Feb 2008 03:33:17 -0500 (EST) X-Original-To: boost-users@lists.boost.org Delivered-To: boost-users@lists.boost.org Original-Received: from francois.mpi-sb.mpg.de (mx2.mpi-sb.mpg.de [139.19.1.2]) by wowbagger.osl.iu.edu (Postfix) with ESMTP id 85B7E2F81AD for ; Thu, 14 Feb 2008 02:40:17 -0500 (EST) Original-Received: from loopback.mpi-sb.mpg.de ([127.0.0.1]:38698 helo=localhost ident=amavis) by francois.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.50) id 1JPYhc-0006E8-0z for boost-users@lists.boost.org; Thu, 14 Feb 2008 08:40:16 +0100 Original-Received: from francois.mpi-sb.mpg.de ([127.0.0.1]) by localhost (aspirin.mpi-sb.mpg.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23550-05 for ; Thu, 14 Feb 2008 08:40:15 +0100 (CET) Original-Received: from infao0710.mpi-sb.mpg.de ([139.19.1.28]:51092 helo=newzak.mpi-sb.mpg.de) by francois.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.50) id 1JPYhY-0006DY-7g; Thu, 14 Feb 2008 08:40:12 +0100 Original-Received: from p54a5de01.dip.t-dialin.net ([84.165.222.1]:64595 helo=[192.168.2.24]) by newzak.mpi-sb.mpg.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JPYhX-0000lh-Rv; Thu, 14 Feb 2008 08:40:12 +0100 X-Notes-Item: NOT CHECKED; name=$DNSBLSite User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mpi-sb.mpg.de X-Mailman-Approved-At: Thu, 14 Feb 2008 03:32:11 -0500 X-BeenThere: boost-users@lists.boost.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Boost Users mailing list List-Unsubscribe: http://lists.boost.org/mailman/listinfo.cgi/boost-users, mailto:boost-users-request@lists.boost.org?subject=unsubscribe List-Archive: http://lists.boost.org/MailArchives/boost-users List-Post: mailto:boost-users@lists.boost.org List-Help: mailto:boost-users-request@lists.boost.org?subject=help List-Subscribe: http://lists.boost.org/mailman/listinfo.cgi/boost-users, mailto:boost-users-request@lists.boost.org?subject=subscribe Original-Sender: boost-users-bounces@lists.boost.org Errors-To: boost-users-bounces@lists.boost.org Xref: news.gmane.org gmane.comp.lib.boost.user:33455 Archived-At: http://permalink.gmane.org/gmane.comp.lib.boost.user/33455 I want to read line by line from a gzipped document.
I first do:
std::ifstream file(fileName.c_str()); boost::iostreams::filtering_streambufboost::iostreams::input in; in.push(boost::iostreams::gzip_decompressor()); in.push(documentFile);
However, then the obvious:
string line; while(std::getline(in, line)) { ... }
does not compile.
Is there really no getline for filtering_streambuf?
getline() is provided by the C++ standard library for use with input streams. The above should compile if you use filtering_stream instead of filtering_streambuf (and possibly make some unrelated changes -- e.g., it doesn't look like "documentFile" is defined).
If not, what is the best way to write one?
You shouldn't need to.
I tried reading character by character using boost::iostream::get(in) but that looks terribly inefficient to me, and is not nice code.
boost::iostreams::get() just calls streambuf::sgetc() in this case. It is just as efficient as calling sgetc() directly, if you are using an optimizing compiler.
Thanks for your help,
Holger
-- Jonathan Turkanis CodeRage http://www.coderage.com