[英]AMQP-CPP RabbitMQ Build Integrating to CPP Project
Hi I currently try to integrate RabbitMQ via AMQPCPP into my VisualStudio Project. 嗨,我目前正在尝试通过AMQPCPP将RabbitMQ集成到我的VisualStudio项目中。 I am restricted to use a Windows PC which is a pain in the ass for the installation.
我只能使用Windows PC,这对安装不利。 I think I was able to build the Project using CMAKE
我认为我能够使用CMAKE构建项目
But I received some Error doing it
但是我这样做有些错误
.
。 Now I am trying to include the build into the VS2017 Project.
现在,我正在尝试将该版本包含在VS2017项目中。 In the Readme https://github.com/CopernicaMarketingSoftware/AMQP-CPP this is done using
在自述文件https://github.com/CopernicaMarketingSoftware/AMQP-CPP中,使用
#include <amqpcpp.h>
But this header is not found in my build. 但是在我的构建中找不到此标头。 I am not used to CPP so I hope I havent done some rudimental error.
我不习惯CPP,所以我希望我没有做过一些基本的错误。 Thanks in advance!
提前致谢!
Open command prompt and switch to AMQP-CPP git/source path. 打开命令提示符并切换到AMQP-CPP git / source路径。
-- Selecting Windows SDK version 10.0.15063.0 to target Windows 6.1.7601.
-- The C compiler identification is MSVC 19.10.25019.0
-- The CXX compiler identification is MSVC 19.10.25019.0
-- Check for working C compiler: E:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe
-- Check for working C compiler: E:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe
-- Check for working CXX compiler: E:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Projects/AMQP-CPP/build
Build succeeded. 构建成功。
"D:\Projects\AMQP-CPP\build\ALL_BUILD.vcxproj" (default target) (1) -> "D:\Projects\AMQP-CPP\build\amqpcpp.vcxproj" (default target) (3) -> (ClCompile target) ->
D:\Projects\AMQP-CPP\src\deferredreceiver.cpp(48): warning C424
4: 'argument': conversion from 'uint64_t' to 'uint32_t', possible loss o
f data [D:\Projects\AMQP-CPP\build\amqpcpp.vcxproj]
1 Warning(s)
0 Error(s)
Time Elapsed 00:00:44.16 经过的时间00:00:44.16
Edit your project CMakeLists.txt file for adding amqpcpp include path and library path for linking. 编辑项目CMakeLists.txt文件,以添加amqpcpp包含链接的路径和库路径。
include_directories(../include)
link_directories(../build/bin/Release)
Include and link directory path may differ based on actual location in your machine. 包含和链接目录路径可能会根据计算机中的实际位置而有所不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.