Describe the bug
The following error occurs when using amqpcpp:
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(85,42): error C2589: '(': illegal token on right side of '::'
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(85,42): error C2059: syntax error: ')'
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(85,1): error C2059: syntax error: ')'
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(103,25): error C2589: '(': illegal token on right side of '::'
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(103,1): error C2062: type 'unknown-type' unexpected
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(103,1): error C2059: syntax error: ')'
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(126,28): error C2589: '(': illegal token on right side of '::'
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(126,1): error C2062: type 'unknown-type' unexpected
E:\vcpkg01\installed\x64-windows\include\amqpcpp\message.h(126,1): error C2059: syntax error: ')'
Expected behavior and actual behavior
Can be linked normally and find the header file amqpcpp.h.
Sample code
usage:
amqpcpp provides CMake targets:
# this is heuristically generated, and may not be correct
find_package(amqpcpp CONFIG REQUIRED)
target_link_libraries(main PRIVATE amqpcpp)
CMakeFindUsage.cpp
#include <iostream>
#include "amqpcpp.hpp"
using namespace std;
int main()
{
cout << "Hello CMake." << endl;
return 0;
}
Describe the bug The following error occurs when using
amqpcpp
:Expected behavior and actual behavior Can be linked normally and find the header file
amqpcpp.h
.Sample code usage:
CMakeFindUsage.cpp
CMakeLists.txt
Reproduce environment:
Related PR: https://github.com/microsoft/vcpkg/pull/31271