Skip to main content
israelp20923262
Known Participant
March 25, 2024
Answered

How to use lbcurl in a plug-in indesign

  • March 25, 2024
  • 1 reply
  • 1036 views

Hi.

'm trying to use the libcurl library to make https calls within an indesign plugin.
I have downloaded the library from the official website and in principle I have configured the plug-in included in the general option of the linker the directory where the libcurl libraries are and in the general option of c/c++ the inclusion directory where the * .h from libcurl.
When I include in the code.

#include "VCPlugInHeaders.h"
#include "Connection_CURL.h"
#include <curl/curl.h>

and I try to compile it gives an error.
Has anyone used the libcurl library for windows 64 within an indesign plugin?
Thank you.

This topic has been closed for replies.
Correct answer sneha30692552dvkj

Hi,

Please double check the linker and include directories configuration for libcurl in your project setting and once go through using libcurl.

1 reply

Inspiring
March 25, 2024

Hi @israelp20923262 ,

 

Libcurl is a popular library and you can find thousands of examples using libcurl on googling.

 

Yes, you can use it with InDesign Plugin Windows 64 and that is no problem.

 

If you are using it for the first time then I suggest you create  console application and try using the library. This way you would be more confident and then you can integrate it with InDesign.

 

Also, you have not mention what error message you are getting ?

 

Are you using static library or Dll ?

 

- Rahul Rastogi

Adobe InDesign C++ Custom Plugin Architect

 

israelp20923262
Known Participant
March 25, 2024

Hi Rahul.

thanks in advance and for the quick response.

I have downloaded the versión 

 

Windows 64-bit8.6.0binarythe curl project

and into bin directory it comes libcurl-x64.dll
I' ve tried wto write this code

int inicializarCURL(void) {
 
curl_easy_init();
CURL *curl;
CURLcode res = CURLE_OK;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
printf("Version with SSL backend '%s':\n\n\t%s\n", "Prueba", curl_version());
}
 
return kTrue;
}
but it gives me an error when compiling.
Thanks
israelp20923262
Known Participant
March 25, 2024

Hi.
The error is the next.
Gravedad Código Descripción Proyecto Archivo Línea Estado suprimido
Error LNK2019 símbolo externo __imp_curl_easy_init sin resolver al que se hace referencia en la función "int __cdecl inicializarCURL(void)" (?inicializarCURL@@YAHXZ) TrebolServiceOWCC C:\Desarrollo\Adobe\SDK Indesign 2021\plugin\build\win\prj\Conexion_CURL.obj 1