yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
708 stars 93 forks source link

LNK1181 cannot open input file 'cpr.lib' #257

Closed therealnv6 closed 2 years ago

therealnv6 commented 2 years ago

CMakeLists.txt

cmake_minimum_required (VERSION 3.13)

project (sleepy-horse)
add_executable(sleepy-horse sleepy-horse.cpp)   

# libraries
find_package(sleepy-discord CONFIG REQUIRED)
target_link_libraries(sleepy-horse sleepy-discord)

Full Error

Severity    Code    Description Project File    Line    Suppression State
Error   LNK1104 cannot open file 'cpr.lib'  C:\Users\Patrick\source\repos\sleepy-horse\out\build\x64-debug\sleepy-horse C:\Users\Patrick\source\repos\sleepy-horse\out\build\x64-debug\LINK 1   

Platform

Not entirely sure if there is any important information I'm leaving out, this is my first time using CMake.

Any help would be appreciated, thanks in advance.

yourWaifu commented 2 years ago

Can you give me the version you installed? the version number from vcpkg

therealnv6 commented 2 years ago

Can you give me the version you installed? the version number from vcpkg

image this I presume?

yourWaifu commented 2 years ago

oh, yes this an issue I'm aware and I have a fix, I forgot to update it on VCPKG. https://github.com/yourWaifu/vcpkg/commit/80b81d10f29450b0fd8954937c65da50d2bca443

therealnv6 commented 2 years ago

oh, yes this an issue I'm aware and I have a fix, I forgot to update it on VCPKG. yourWaifu/vcpkg@80b81d1

after manually applying this patch and updating the package, still seem to be getting the same issue but with LNK1104.

Severity    Code    Description Project File    Line    Suppression State
Error   LNK1104 cannot open file 'cpr.lib'  C:\Users\Patrick\source\repos\sleepy-horse\out\build\x64-debug\sleepy-horse C:\Users\Patrick\source\repos\sleepy-horse\out\build\x64-debug\LINK 1   
yourWaifu commented 2 years ago

you need to uninstall, reinstall, then try reconfiguring

therealnv6 commented 2 years ago

big thanks, that indeed worked.