microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.26k stars 6.41k forks source link

pkg restclient-cpp can not resolve symbol #8294

Closed how0723 closed 5 years ago

how0723 commented 5 years ago

Describe the bug 1>main.obj : error LNK2019: 无法解析的外部符号 "struct RestClient::Response __cdecl RestClient::get(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?get@RestClient@@YA?AUResponse@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z),该符号在函数 main 中被引用 can not resolve symbol

Environment

To Reproduce Steps to reproduce the behavior:

  1. ./vcpkg install restclient-cpp:x64
  2. See error Repro code when

Expected behavior A clear and concise description of what you expected to happen.

Failure logs error LNK2019: 无法解析的外部符号 "struct RestClient::Response __cdecl RestClient::get(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?get@RestClient@@ya?AUResponse@1@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z),该符号在函数 main 中被引用

Additional context Add any other context about the problem here.

MVoz commented 5 years ago

Failure logs -(please attached failure logs)

how0723 commented 5 years ago

@Voskrese not build failure. I use it in vs2017 and not work well. shows :error LNK2019: 无法解析的外部符号 "struct RestClient::Response __cdecl RestClient::get(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?get@RestClient@@ya?AUResponse@1@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z),该符号在函数 main 中被引用

无法解析的外部符号 means can not resolve symbol

how0723 commented 5 years ago

@Voskrese restclient-cpp build success

MVoz commented 5 years ago

static or dynamik ? (please attached failure logs) !!!

how0723 commented 5 years ago

@Voskrese dynamik

MVoz commented 5 years ago

you understand, there is too little source data, it is very difficult to understand what you are doing and what you are compiling

without input source data, nothing is clear

scholervb commented 4 years ago

i tried building x86 and x64 ones today, seems they are successfully build.

vcpkg.exe install restclient-cpp vcpkg.exe install restclient-cpp:x64-windows

Computing installation plan... The following packages will be built and installed:

Total elapsed time: 5.568 min

The package restclient-cpp:x64-windows provides CMake targets:

find_package(restclient-cpp CONFIG REQUIRED)
target_link_libraries(main PRIVATE restclient-cpp)