vcpkg - Header files not recognized

已回答

Hello,

My setup is CLion 2020.1.3, WSL2 toolchain and vcpkg. I am building a header-only library and some Catch2 tests. I have included

"-DCMAKE_TOOLCHAIN_FILE=/home/zzzz/vcpkg/scripts/buildsystems/vcpkg.cmake" 

in my CMake profile and I can successfully build the project. However, I see red squigglies under all includes in my header file. My project structure and the header file is attached. I have tried Reset Cache and Reload, Unload CMake and then re-load and also resync with remote hosts, nothing seems to work.

Thank you.

0

I had to use vcpkg lib yesterday, this was my flow >

 

include(c:/path/To/vcpkg/scripts/buildsystems/vcpkg.cmake)
find_package(libzippp REQUIRED)
0

Hi Suhas Ghorpadkar!

I assume the problems are related to the fact that CLion can't handle interface libraries properly - https://youtrack.jetbrains.com/issue/CPP-11340. Please see the last comment in the issue for more details.

Feel free to comment or upvote the issue. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

0

请先登录再写评论。