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: Getting Redefinition Error

From: T V LIJIN \(EXT\) via curl-library <"T>
Date: Tue, 13 Oct 2020 08:17:54 +0000

Hello Daniel Stenberg,

Since I'm new to this and want Curl to be ported for RTOS , is there any porting manual / guide available with you , that can be shared , so that I can follow the steps mentioned in it.

Because while defining BUILDING_LIBCURL , I'm encountered with certain linker errors.

1>cram.obj : error LNK2019: unresolved external symbol _Curl_base64_encode referenced in function _Curl_auth_create_cram_md5_message
1>digest.obj : error LNK2001: unresolved external symbol _Curl_base64_encode
1>http.obj : error LNK2001: unresolved external symbol _Curl_base64_encode
1>ntlm.obj : error LNK2001: unresolved external symbol _Curl_base64_encode
1>cram.obj : error LNK2019: unresolved external symbol _Curl_base64_decode referenced in function _Curl_auth_decode_cram_md5_message
1>digest.obj : error LNK2001: unresolved external symbol _Curl_base64_decode
1>ntlm.obj : error LNK2001: unresolved external symbol _Curl_base64_decode
1>cram.obj : error LNK2001: unresolved external symbol _Curl_HMAC_MD5
1>curl_ntlm_core.obj : error LNK2001: unresolved external symbol _Curl_HMAC_MD5
1>curl_ntlm_core.obj : error LNK2019: unresolved external symbol _Curl_md4it referenced in function _Curl_ntlm_core_mk_nt_hash
1>digest.obj : error LNK2019: unresolved external symbol _Curl_md5it referenced in function _Curl_auth_create_digest_http_message
1>ntlm.obj : error LNK2001: unresolved external symbol _Curl_md5it
1>digest.obj : error LNK2019: unresolved external symbol _Curl_MD5_init referenced in function _Curl_auth_create_digest_md5_message
1>digest.obj : error LNK2019: unresolved external symbol _Curl_MD5_update referenced in function _Curl_auth_create_digest_md5_message
1>digest.obj : error LNK2019: unresolved external symbol _Curl_MD5_final referenced in function _Curl_auth_create_digest_md5_message
1>digest.obj : error LNK2019: unresolved external symbol _Curl_sha256it referenced in function _Curl_auth_create_digest_http_message
1>digest.obj : error LNK2001: unresolved external symbol _Curl_DIGEST_MD5
1>doh.obj : error LNK2019: unresolved external symbol _Curl_base64url_encode referenced in function _dohprobe

Waiting for your valuable feedback,


Thanks,
LIJIN T V
________________________________
From: Daniel Stenberg <daniel_at_haxx.se>
Sent: Tuesday, October 13, 2020 11:58 AM
To: T V LIJIN (EXT) <lijin.tv_at_kone.com>
Cc: curl-library_at_cool.haxx.se <curl-library_at_cool.haxx.se>
Subject: Re: Getting Redefinition Error

This message is from an external sender. Be cautious, especially with links and attachments.

On Tue, 13 Oct 2020, T V LIJIN (EXT) wrote:

(please don't top-post)

> The version of Libcurl I'm using is curl-7.72.0 I'm trying to build this for
> windows-Visual studio 19 by using just the source and header files because I
> don't want to build it as .so or lib dll file : I have attached the copy of
> the same; I'm trying to build this way to make it easy to port for RTOS
> devices.

So you're not using one of our many provided means of building curl; you're
doing it your own way and you get an error while doing so.

I've probably ported curl to more RTOSes than most and I disagree with the
idea that you're taking the easier route by doing this. You're merely
confating things by merging separate builds into a single one. I don't think
it helps - even for RTOSes.

All this said, I believe your main problem is that you don't define
BUILDING_LIBCURL when you build libcurl. Note that this define must only be
set when you build libcurl, not for code that *uses* it. (Another reason to
keep the builds separate)

--
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.wolfssl.com%2Fcontact%2F&amp;data=04%7C01%7Clijin.tv%40kone.com%7Cef03545447c24030f99508d86f412a00%7C2bb82c642eb143f78862fdc1d2333b50%7C0%7C0%7C637381672949803592%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Nn5%2FPzOoTqjPq%2FL%2FLHTqY5uIc3nYeNoQW4R1dDRXyM8%3D&amp;reserved=0


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-10-13