Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Creating a static library for Casablanca C++ rest SDK 2.3

$
0
0
I was successful with static linking when used the following steps:

C++REST For Release .lib:
  1. Configuration Properties -> General -> Target Extension : .lib (from .dll)
  2. Configuration Properties -> Configuration Type : Ststic library (.lib)
  3. Configuration Properties -> C/C+=-> Optimization-> Whole Program Optimization : No
  4. Configuration Properties -> C/C+=-> Preprocessor -> Processor Definitions : _NO_ASYNCRTIMP (added)
  5. Configuration Properties -> C/C+=-> Code Generation -> Runtime Library: Multi-threaded (/MT)
The result is : cpprest120_2_4_Release_Win32.lib


User Code:

The User Code must include also the Boost and SSL libraries.
Configuration Properties -> VC++Directories -> Library Directories :
C:\ ... \OpenSSL\lib\VC\static
C:\ ... \Boost\boost_1_57_0\stage\lib
C:\ ... \CppREST\lib\Release (<-- Copied the "cpprest120_2_4_Release_Win32.lib" here.)

The User Code must include the include directory:
Configuration Properties -> VC++Directories -> Include Directories :
C:\ ... \CppREST\include (<-- Copied the cpprest and pplx folders here whit *.h.)

add in:
Configuration Properties ->C/C+=-> Preprocessor -> Processor Definitions :
_NO_ASYNCRTIMP
_NO_PPLXIMP

add in:
Configuration Properties ->Linker ->
libeay32MT.lib
ssleay32MT.lib
crypt32.lib

bcrypt.lib

I do not understand why the "cpprest120_2_4_Release_Win32.lib" not contain all the required functions from it's libraries like the used SSL and Boost components?
It would be more logical (for me) if library A uses lib1.lib and lib2.lib to make libA.lib, and if somebody uses libA.lib it should not need to include in the project the lib1.lib and lib2.lib .?

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>