February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | Were you also able to build curl with dmc++? "C" <dont@respond.com> wrote in message news:c077jd$que$1@digitaldaemon.com... > Yep already sent ( on the mailing list ) ;). > > C > "Walter" <walter@digitalmars.com> wrote in message > news:c0776m$qc5$1@digitaldaemon.com... > > That was fast! Could you let the curl guys know so they can put a link up > at > > http://curl.haxx.se/libcurl/ for the D bindings? > > > > "C" <dont@respond.com> wrote in message news:c0706q$e9v$1@digitaldaemon.com... > > > Ok , the api wrappers are at www.atari-soldiers.com/curl.d . Compiled > and > > > tested with linux , ill work on compiling with dmc for windows. > > > > > > Im working on some OO wrappers ill post shortly. > > > > > > Here is the simple.d example : > > > > > > > > > import curl; > > > > > > import std.c.stdio; > > > import std.string; > > > > > > alias std.string.toStringz c_str; > > > > > > int main() > > > { > > > CURL *curl; > > > CURLcode res; > > > > > > curl = curl_easy_init(); > > > if(curl) { > > > curl_easy_setopt(curl, CURLOPT_URL, c_str("www.digitalmars.com")); > > > res = curl_easy_perform(curl); > > > > > > /* always cleanup */ > > > curl_easy_cleanup(curl); > > > } > > > return 0; > > > } > > > > > > If you havent used libcurl you should check it out , its very cool .( > > > http://curl.haxx.se ) > > > > > > C > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:c04708$1vv1$1@digitaldaemon.com... > > > > > > > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > > > > > You may want to compile it with DigitalMars C compiler into a lib. > > This > > > > > is the easiest. > > > > > > > > > > After you get it to work within a simple DigitalMars C or C++ > program, > > > > > the step to D would be trivial and any failure would be easy to > > > diagnose. > > > > > > > > Yes, a static lib. I'd forget about making a curl dll for this > project. > > > > > > > > > > > > > > > > > > > > |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Not yet, I tried a couple months back , and the pre-proccessor seems to proccess the files correctly only if it was in C++ mode , but the libcurl code contains C++ keywords it would need to be ansi-c. I will try soon , unfortunately I only use linux at work ( I billed the time working on it ) ) , and Im moving so it might be a while. C "Walter" <walter@digitalmars.com> wrote in message news:c07efa$158j$1@digitaldaemon.com... > Were you also able to build curl with dmc++? > > "C" <dont@respond.com> wrote in message news:c077jd$que$1@digitaldaemon.com... > > Yep already sent ( on the mailing list ) ;). > > > > C > > "Walter" <walter@digitalmars.com> wrote in message > > news:c0776m$qc5$1@digitaldaemon.com... > > > That was fast! Could you let the curl guys know so they can put a link > up > > at > > > http://curl.haxx.se/libcurl/ for the D bindings? > > > > > > "C" <dont@respond.com> wrote in message news:c0706q$e9v$1@digitaldaemon.com... > > > > Ok , the api wrappers are at www.atari-soldiers.com/curl.d . Compiled > > and > > > > tested with linux , ill work on compiling with dmc for windows. > > > > > > > > Im working on some OO wrappers ill post shortly. > > > > > > > > Here is the simple.d example : > > > > > > > > > > > > import curl; > > > > > > > > import std.c.stdio; > > > > import std.string; > > > > > > > > alias std.string.toStringz c_str; > > > > > > > > int main() > > > > { > > > > CURL *curl; > > > > CURLcode res; > > > > > > > > curl = curl_easy_init(); > > > > if(curl) { > > > > curl_easy_setopt(curl, CURLOPT_URL, c_str("www.digitalmars.com")); > > > > res = curl_easy_perform(curl); > > > > > > > > /* always cleanup */ > > > > curl_easy_cleanup(curl); > > > > } > > > > return 0; > > > > } > > > > > > > > If you havent used libcurl you should check it out , its very cool .( > > > > http://curl.haxx.se ) > > > > > > > > C > > > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:c04708$1vv1$1@digitaldaemon.com... > > > > > > > > > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > > > > > > You may want to compile it with DigitalMars C compiler into a lib. > > > This > > > > > > is the easiest. > > > > > > > > > > > > After you get it to work within a simple DigitalMars C or C++ > > program, > > > > > > the step to D would be trivial and any failure would be easy to > > > > diagnose. > > > > > > > > > > Yes, a static lib. I'd forget about making a curl dll for this > > project. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | "C" <dont@respond.com> wrote in message news:c07ers$16aj$1@digitaldaemon.com... > Not yet, I tried a couple months back , and the pre-proccessor seems to proccess the files correctly only if it was in C++ mode , but the libcurl code contains C++ keywords it would need to be ansi-c. I will try soon , unfortunately I only use linux at work ( I billed the time working on it ) ) , and Im moving so it might be a while. Dude! Amusing as it is to read, do you really want this publicly and permanently accessible?! > > C > > "Walter" <walter@digitalmars.com> wrote in message news:c07efa$158j$1@digitaldaemon.com... > > Were you also able to build curl with dmc++? > > > > "C" <dont@respond.com> wrote in message news:c077jd$que$1@digitaldaemon.com... > > > Yep already sent ( on the mailing list ) ;). > > > > > > C > > > "Walter" <walter@digitalmars.com> wrote in message > > > news:c0776m$qc5$1@digitaldaemon.com... > > > > That was fast! Could you let the curl guys know so they can put a link > > up > > > at > > > > http://curl.haxx.se/libcurl/ for the D bindings? > > > > > > > > "C" <dont@respond.com> wrote in message news:c0706q$e9v$1@digitaldaemon.com... > > > > > Ok , the api wrappers are at www.atari-soldiers.com/curl.d . > Compiled > > > and > > > > > tested with linux , ill work on compiling with dmc for windows. > > > > > > > > > > Im working on some OO wrappers ill post shortly. > > > > > > > > > > Here is the simple.d example : > > > > > > > > > > > > > > > import curl; > > > > > > > > > > import std.c.stdio; > > > > > import std.string; > > > > > > > > > > alias std.string.toStringz c_str; > > > > > > > > > > int main() > > > > > { > > > > > CURL *curl; > > > > > CURLcode res; > > > > > > > > > > curl = curl_easy_init(); > > > > > if(curl) { > > > > > curl_easy_setopt(curl, CURLOPT_URL, c_str("www.digitalmars.com")); > > > > > res = curl_easy_perform(curl); > > > > > > > > > > /* always cleanup */ > > > > > curl_easy_cleanup(curl); > > > > > } > > > > > return 0; > > > > > } > > > > > > > > > > If you havent used libcurl you should check it out , its very cool > .( > > > > > http://curl.haxx.se ) > > > > > > > > > > C > > > > > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:c04708$1vv1$1@digitaldaemon.com... > > > > > > > > > > > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > > > > > > > You may want to compile it with DigitalMars C compiler into a > lib. > > > > This > > > > > > > is the easiest. > > > > > > > > > > > > > > After you get it to work within a simple DigitalMars C or C++ > > > program, > > > > > > > the step to D would be trivial and any failure would be easy to > > > > > diagnose. > > > > > > > > > > > > Yes, a static lib. I'd forget about making a curl dll for this > > > project. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | What my inability to get libcurl compiled ( actually I found the old makefile and am working on it )? Or if its the billing thing I got apporval before hand of course :P. C "Matthew" <matthew.hat@stlsoft.dot.org> wrote in message news:c07m23$1k0i$1@digitaldaemon.com... > "C" <dont@respond.com> wrote in message news:c07ers$16aj$1@digitaldaemon.com... > > Not yet, I tried a couple months back , and the pre-proccessor seems to proccess the files correctly only if it was in C++ mode , but the libcurl > > code contains C++ keywords it would need to be ansi-c. I will try soon , > > unfortunately I only use linux at work ( I billed the time working on it > > ) ) , and Im moving so it might be a while. > > Dude! Amusing as it is to read, do you really want this publicly and permanently accessible?! > > > > > C > > > > "Walter" <walter@digitalmars.com> wrote in message news:c07efa$158j$1@digitaldaemon.com... > > > Were you also able to build curl with dmc++? > > > > > > "C" <dont@respond.com> wrote in message news:c077jd$que$1@digitaldaemon.com... > > > > Yep already sent ( on the mailing list ) ;). > > > > > > > > C > > > > "Walter" <walter@digitalmars.com> wrote in message > > > > news:c0776m$qc5$1@digitaldaemon.com... > > > > > That was fast! Could you let the curl guys know so they can put a > link > > > up > > > > at > > > > > http://curl.haxx.se/libcurl/ for the D bindings? > > > > > > > > > > "C" <dont@respond.com> wrote in message news:c0706q$e9v$1@digitaldaemon.com... > > > > > > Ok , the api wrappers are at www.atari-soldiers.com/curl.d . > > Compiled > > > > and > > > > > > tested with linux , ill work on compiling with dmc for windows. > > > > > > > > > > > > Im working on some OO wrappers ill post shortly. > > > > > > > > > > > > Here is the simple.d example : > > > > > > > > > > > > > > > > > > import curl; > > > > > > > > > > > > import std.c.stdio; > > > > > > import std.string; > > > > > > > > > > > > alias std.string.toStringz c_str; > > > > > > > > > > > > int main() > > > > > > { > > > > > > CURL *curl; > > > > > > CURLcode res; > > > > > > > > > > > > curl = curl_easy_init(); > > > > > > if(curl) { > > > > > > curl_easy_setopt(curl, CURLOPT_URL, > c_str("www.digitalmars.com")); > > > > > > res = curl_easy_perform(curl); > > > > > > > > > > > > /* always cleanup */ > > > > > > curl_easy_cleanup(curl); > > > > > > } > > > > > > return 0; > > > > > > } > > > > > > > > > > > > If you havent used libcurl you should check it out , its very cool > > .( > > > > > > http://curl.haxx.se ) > > > > > > > > > > > > C > > > > > > > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:c04708$1vv1$1@digitaldaemon.com... > > > > > > > > > > > > > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > > > > > > > > You may want to compile it with DigitalMars C compiler into a > > lib. > > > > > This > > > > > > > > is the easiest. > > > > > > > > > > > > > > > > After you get it to work within a simple DigitalMars C or C++ > > > > program, > > > > > > > > the step to D would be trivial and any failure would be easy > to > > > > > > diagnose. > > > > > > > > > > > > > > Yes, a static lib. I'd forget about making a curl dll for this > > > > project. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | > Or if its the billing thing I got apporval > before hand of course :P. My mistake. Any imputations to your character utterly retracted. :) > C > > > "Matthew" <matthew.hat@stlsoft.dot.org> wrote in message news:c07m23$1k0i$1@digitaldaemon.com... > > "C" <dont@respond.com> wrote in message news:c07ers$16aj$1@digitaldaemon.com... > > > Not yet, I tried a couple months back , and the pre-proccessor seems to > > > proccess the files correctly only if it was in C++ mode , but the > libcurl > > > code contains C++ keywords it would need to be ansi-c. I will try soon > , > > > unfortunately I only use linux at work ( I billed the time working on > it > > > ) ) , and Im moving so it might be a while. > > > > Dude! Amusing as it is to read, do you really want this publicly and permanently accessible?! > > > > > > > > C > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:c07efa$158j$1@digitaldaemon.com... > > > > Were you also able to build curl with dmc++? > > > > > > > > "C" <dont@respond.com> wrote in message news:c077jd$que$1@digitaldaemon.com... > > > > > Yep already sent ( on the mailing list ) ;). > > > > > > > > > > C > > > > > "Walter" <walter@digitalmars.com> wrote in message > > > > > news:c0776m$qc5$1@digitaldaemon.com... > > > > > > That was fast! Could you let the curl guys know so they can put a > > link > > > > up > > > > > at > > > > > > http://curl.haxx.se/libcurl/ for the D bindings? > > > > > > > > > > > > "C" <dont@respond.com> wrote in message news:c0706q$e9v$1@digitaldaemon.com... > > > > > > > Ok , the api wrappers are at www.atari-soldiers.com/curl.d . > > > Compiled > > > > > and > > > > > > > tested with linux , ill work on compiling with dmc for windows. > > > > > > > > > > > > > > Im working on some OO wrappers ill post shortly. > > > > > > > > > > > > > > Here is the simple.d example : > > > > > > > > > > > > > > > > > > > > > import curl; > > > > > > > > > > > > > > import std.c.stdio; > > > > > > > import std.string; > > > > > > > > > > > > > > alias std.string.toStringz c_str; > > > > > > > > > > > > > > int main() > > > > > > > { > > > > > > > CURL *curl; > > > > > > > CURLcode res; > > > > > > > > > > > > > > curl = curl_easy_init(); > > > > > > > if(curl) { > > > > > > > curl_easy_setopt(curl, CURLOPT_URL, > > c_str("www.digitalmars.com")); > > > > > > > res = curl_easy_perform(curl); > > > > > > > > > > > > > > /* always cleanup */ > > > > > > > curl_easy_cleanup(curl); > > > > > > > } > > > > > > > return 0; > > > > > > > } > > > > > > > > > > > > > > If you havent used libcurl you should check it out , its very > cool > > > .( > > > > > > > http://curl.haxx.se ) > > > > > > > > > > > > > > C > > > > > > > > > > > > > > "Walter" <walter@digitalmars.com> wrote in message news:c04708$1vv1$1@digitaldaemon.com... > > > > > > > > > > > > > > > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > > > > > > > > > You may want to compile it with DigitalMars C compiler into > a > > > lib. > > > > > > This > > > > > > > > > is the easiest. > > > > > > > > > > > > > > > > > > After you get it to work within a simple DigitalMars C or > C++ > > > > > program, > > > > > > > > > the step to D would be trivial and any failure would be easy > > to > > > > > > > diagnose. > > > > > > > > > > > > > > > > Yes, a static lib. I'd forget about making a curl dll for this > > > > > project. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | "C" <dont@respond.com> wrote in message news:c07ers$16aj$1@digitaldaemon.com... > Not yet, I tried a couple months back , and the pre-proccessor seems to proccess the files correctly only if it was in C++ mode , but the libcurl code contains C++ keywords it would need to be ansi-c. I will try soon , unfortunately I only use linux at work ( I billed the time working on it ) ) , and Im moving so it might be a while. There was an issue with the preprocessor that was preventing boost from compiling that is fixed in 8.39 (insertion of extra spaces in concatenated strings). Was that it? |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Yea thats probably it , they use these macros to define their options #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number #define CFINIT(name) CURLFORM_ ## name Cool that will make it easier. C "Walter" <walter@digitalmars.com> wrote in message news:c08nmm$s2a$1@digitaldaemon.com... > > "C" <dont@respond.com> wrote in message news:c07ers$16aj$1@digitaldaemon.com... > > Not yet, I tried a couple months back , and the pre-proccessor seems to proccess the files correctly only if it was in C++ mode , but the libcurl > > code contains C++ keywords it would need to be ansi-c. I will try soon , > > unfortunately I only use linux at work ( I billed the time working on it > > ) ) , and Im moving so it might be a while. > > There was an issue with the preprocessor that was preventing boost from compiling that is fixed in 8.39 (insertion of extra spaces in concatenated strings). Was that it? > > |
February 09, 2004 Re: Libcurl D bindings , Was Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | "C" <dont@respond.com> wrote in message news:c0906k$1add$1@digitaldaemon.com... > Yea thats probably it , they use these macros to define their options > > #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + > number > > #define CFINIT(name) CURLFORM_ ## name > > Cool that will make it easier. Rock on! |
February 10, 2004 Re: Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | Hmm ok. I got it to compile , needed to change ftp.c , there was a variable named 'try' , and to compile the example , easycurl.h includes winnt.h , there was an error with typdef long LONG; changed to #define LONG long; and it works ok. However when the sample is run it crashes inexplicably. I ran it through the debugger ( by the way if anyone doesnt have the CD they should get it for the debugger alone its very useful ) , seems its crashing on curl_easy_perform . Here's the Call window, main curl_easy_perform Curl_perform Curl_connect <-- crashing , calling CreateConnection . CreateConnection is in url.c , and is huge. Ive posted the libcurl build at www.atari-soldiers.com/libcurlDMC.zip . It should build without a problem , youll probably need to change those lines in WINNT.h though. The makefile is Makefile.dmc , make -f Makefile.dmc should do the trick. Everyone that can help please do! Thanks, Charlie "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > You may want to compile it with DigitalMars C compiler into a lib. This is the easiest. > > After you get it to work within a simple DigitalMars C or C++ program, the step to D would be trivial and any failure would be easy to diagnose. > > -eye > > C wrote: > > I have tried in the past , i took the approach of building the .dll in VC , > > and using implib to create a .lib. I got it to compile , but it failed on > > startup , with .. I forget the error. Its been a couple months though , Ill > > give it another go around. > > > > I also need to re-read the C to D section, I've forgotten how D handles memory allocated from within C functions :/. > > > > C > |
February 10, 2004 Re: Reality check. | ||||
---|---|---|---|---|
| ||||
Posted in reply to C | Just to be clear here, im trying to compile simple.c , trying to get the libcurl to play with DMC. C "C" <dont@respond.com> wrote in message news:c0bet1$298o$1@digitaldaemon.com... > Hmm ok. I got it to compile , needed to change ftp.c , there was a variable > named 'try' , and to compile the example , easycurl.h includes winnt.h , there was an error with > > typdef long LONG; > > changed to > > #define LONG long; > > and it works ok. However when the sample is run it crashes inexplicably. I > ran it through the debugger ( by the way if anyone doesnt have the CD they should get it for the debugger alone its very useful ) , seems its crashing > on curl_easy_perform . > > Here's the Call window, > > main > curl_easy_perform > Curl_perform > Curl_connect <-- crashing , calling CreateConnection . > > CreateConnection is in url.c , and is huge. > > Ive posted the libcurl build at www.atari-soldiers.com/libcurlDMC.zip . It > should build without a problem , youll probably need to change those lines in WINNT.h though. The makefile is Makefile.dmc , make -f Makefile.dmc should do the trick. > > > Everyone that can help please do! > > Thanks, > Charlie > > > > "Ilya Minkov" <minkov@cs.tum.edu> wrote in message news:c03r5f$1bf7$1@digitaldaemon.com... > > You may want to compile it with DigitalMars C compiler into a lib. This is the easiest. > > > > After you get it to work within a simple DigitalMars C or C++ program, the step to D would be trivial and any failure would be easy to diagnose. > > > > -eye > > > > C wrote: > > > I have tried in the past , i took the approach of building the .dll in > VC , > > > and using implib to create a .lib. I got it to compile , but it failed > on > > > startup , with .. I forget the error. Its been a couple months though , > Ill > > > give it another go around. > > > > > > I also need to re-read the C to D section, I've forgotten how D handles > > > memory allocated from within C functions :/. > > > > > > C > > > > |
Copyright © 1999-2021 by the D Language Foundation