curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. 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 himself.

RE: Undefined reference of a new libcurl function

From: Arnaud Compan via curl-library <curl-library_at_lists.haxx.se>
Date: Fri, 14 Oct 2022 06:32:36 +0000

>
> On Thu, Oct 13, 2022 at 08:46:20AM +0000, Arnaud Compan via curl-library
> wrote:
> > In details, I've added the function in lib/multi.c:
> > void my_test(struct Curl_easy *data)
> > {
> > }
> > And in include/curl/multi.h:
> > CURL_EXTERN void my_test(CURL *curl_handle);
>
> The function signatures do not match. This will cause a problem with some
> compilers. Try making the arguments in both cases the same type.

Indeed.
I've followed what is done for legacy public curl functions. For example curl_easy_cleanup():

    ./lib/easy.c : void curl_easy_cleanup(struct Curl_easy *data)
    ./include/curl/easy.h : CURL_EXTERN void curl_easy_cleanup(CURL *curl);

I'll try with the same type.

Regards,
Arnaud


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-10-14