microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.96k stars 1.65k forks source link

How can I use cpprestsdk dll file with vs2008 MFC project? #754

Open fiveight58 opened 6 years ago

fiveight58 commented 6 years ago

I have an old project developed by vs2008, I can not update it to vs2017, How can I use cpprestsdk dll file with vs2008 MFC project? Thanks!

garethsb commented 6 years ago

If you use CMake you can attempt to build cpprestsdk yourself with the VS 2008 generator...

fiveight58 commented 6 years ago

Thanks! But as far as I know, the head files of cpprestsdk use c++11. But vs2008 can not support c++11.

garethsb commented 6 years ago

Ah, yes, that's true... I'd forgotten quite how old VS 2008 was. I think therefore, you would need to create a shim DLL that wrapped the functionality you need from cpprestsdk into a C++03 API. Or if it's just some VS 2008 era DLLs that you need to use, much better to do the reverse and build a modern C++ app that uses those.