cURL / Mailing Lists / curl-library / Single Mail

curl-library

Error when building libcurl v7.49.0 with mbedTLS

From: Moti Avrahami <moti.dp_at_gmail.com>
Date: Tue, 24 May 2016 12:31:33 +0300

Hello,

I tried to upgrade libcurl from v7.47.1 to v7.49.0 and encountered this
build error :

"LNK2019: unresolved external symbol _snprintf referenced in function
_Curl_mbedtls_version"

After little investigating for trying to understand what have been changed
from 7.47.1, I saw that the following lines were removed from
'\include\curl\mprintf.h':

#ifdef _MPRINTF_REPLACE

# undef printf

# undef fprintf

# undef sprintf

# undef vsprintf

# undef snprintf

# undef vprintf

# undef vfprintf

# undef vsnprintf

# undef aprintf

# undef vaprintf

# define printf curl_mprintf

# define fprintf curl_mfprintf

# define sprintf curl_msprintf

# define vsprintf curl_mvsprintf

# define snprintf curl_msnprintf

# define vprintf curl_mvprintf

# define vfprintf curl_mvfprintf

# define vsnprintf curl_mvsnprintf

# define aprintf curl_maprintf

# define vaprintf curl_mvaprintf

#endif

After putting them back - it was worked.

Does it a bug? Should I do something else to solve it?

I am using mbedTLS v2.2.1 by the way.

Thanks,

Moti Avrahami

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-24