curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: Where is curlx_dyn_addn defined?

From: Bill Pierce via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 29 May 2024 12:39:03 -0500

On 5/29/2024 5:00 AM, curl-library-request_at_lists.haxx.se wrote:

I grabbed the sources from github using Git Bash on May 24, 2024, but when I
tried to compile a test program with selected libcurl files, curlx_dyn_addn
was undefined.

Daniel Stenberg wrote:

I recommend you use one of the provided ways to build libcurl.

You probably did not define BUILDING_LIBCURL when building libcurl which you
can see in lib/dynbuf.h will change some things around. The only user of that
header that is not building libcurl is the curl tool that reuses it.

Dan wrote:

It's called Curl_dyn_addn() in the source (in lib/dynbuf.c), but it's renamed to curlx_dyn_addn with a macro in lib/dynbuf.h. It's a bit backwards, but there are reasons.

---
Daniel, I don't want to build libcurl, at least not at the moment. I want to use the functions in libcurl by incorporating their source files into my little test program, sort of like the curl tool does. That way I can put in breakpoints, single-step and look at variables to see how it all works.
Dan Fandrich,
Thanks. That's what I needed to know. I understand that there are reasons, but to say that it's a bit convoluted is an understatement.
Bill Pierce
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-05-29