Step:
- download the latest rabbitmq-c via:
- follow the document, download the cmake tool, make sure the right version of cmake.
- install the C compiler, if developed by VS2012, so set MSVC110=VS2012
- convert rabbitmq-c to C++ project via cmake command
- create "build" folder to rabbitmq-c root folder, then new bat file with below comman:
REM -- create and put into /rabbitmq-c-0.9.0/build folder, then run the batREM -- -DENABLE_SSL_SUPPORT=OFF disable SSL feature, otherwise will occur ssl errorREM -- -G "Visual Studio 11 2012" , set the build environmentcmake .. -DENABLE_SSL_SUPPORT=OFF -G "Visual Studio 11 2012"pause
- create "build" folder to rabbitmq-c root folder, then new bat file with below comman:
- open the C++ project generate in step 4, then build rabbitmq project with Release version
- rename the rabbitmq.*.dll to rabbitmq.1.dll, then replace to the target folder
Troubleshooting:
- "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found suitable version "0.9.8h", minimum required is "0.9.8")"
- Solution1: add OPENSSL_ROOT_DIR command to bat file: -DOPENSSL_ROOT_DIR="C:\Users\zhengs\Downloads\openssl-0.9.8k_WIN32" https://stackoverflow.com/questions/16248775/cmake-not-able-to-find-openssl-library
- Solution2: Disable SSL suppport, add "-DENABLE_SSL_SUPPORT=OFF" to command. https://github.com/conetix/librabbitmq