0

I am writing a C++ program using C++Builder from Embarcadero. My application uses wininet.lib to do basic internet connections. I have some new c++ code I need to integrate into my application that use winhttp.lib to access the internet. This causes many "Multiple declaration" errors for the functions in both .lib files such as (Multiple declaration for 'HTTP_VERSION_INFO'). There are also a lot of "Redefinition" warnings such as (Redefinition of 'SECURITY_FLAG_IGNORE_CERT_DATE_INVALID' is not identical)

What is the best way to resolve this problem? Should I rewrite the new code so it uses wininet.lib and not winhttp.lib? Is it possible to isolate the code that uses winhttp.lib so there no conflict? How would you solve this problem?

homebase
  • 713
  • 1
  • 6
  • 20
  • Step 1) post a [mcve] along with your compiler errors (*verbatim*). – Jesper Juhl Apr 17 '18 at 18:57
  • The way I have dealt with this issue is migrating all my code to winhttp. – Mahesh Apr 17 '18 at 18:58
  • 3
    `.lib` files do not cause compiler errors. Whatever compiler errors you are seeing are due to the API `.h` files instead. If you are trying to use WinInet and WinHTTP in the same `.cpp` file, and they are causing conflicts with each other, then simply don't use them in the same `.cpp` file. – Remy Lebeau Apr 17 '18 at 21:31

0 Answers0