cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] [solved] VS C++ compilation errors

From: Peteris Krumins [Newsgroups] <pknewsgroups_at_gmail.com>
Date: Tue, 02 Aug 2005 19:19:17 +0300

 Hello!

 Ok, here is why it doesnt work.
 cURL.hpp "wraps" curl.h header in cURL namespace. Everything in curl.h gets
 declared in cURL namespace. curl.h also #includes time.h. So everything in time.h
 gets declared in cURL namespace as well.
 When someone #includes ctime after cURL.hpp has been included, time.h guards
 prevent it from being included in ctime again so what should have been declared
 in global namespace does not get declared there.
 And boom, errors. See the example below.

 This is very bad. As cURL.hpp is the essence of cURLpp, the whole library at the
 moment is broken.
 The only fix I see is not to "wrap" curl.h in cURL namespace. This fix breaks
 compatibility with previous versions unfortunately. :(

// Example of what happens in cURL.hpp
//
namespace NameSPACES {
#include <time.h>
}
#include <ctime>
 
int main(void){}

P.Krumins

_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2005-08-02

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET