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?