Separation of code a) that's using the 3rd party library b) that's using cpprestsdk into different compilation units should solve the problem.