D++ (DPP)
C++ Discord API Bot Library
|
Head on over to File > Settings
(Ctrl+Alt+S), then navigate to Build, Execution, Deployment > Toolchains
.
If there is a Visual Studio toolchain there, drag it to the top of the list. This will make the Visual Studio toolchain the default toolchain.
If you don't have the Visual Studio toolchain, you can hit the plus symbol above the list of toolchains and add a toolchain. This is also how you can add WSL as a toolchain!
From there, you need to drag it to the top (if it didn't already add at the top) to ensure it's the default toolchain.
To use vcpkg in CLion, add the following line to your CMake options in the settings (Located under Settings > Build, Execution, Deployment > CMake
)
For example, if your root folder is C:/vcpkg/
then the CMake option will be:
Open your main.cpp
file and then copy and paste the following example program in. Then, set your bot token (see Creating a Bot Token). Here's how your main.cpp
file should look:
If everything went well, you should now have a functioning bot! If not, feel free to ask us on the D++ discord server.
If you see a message like Detecting C compiler ABI info - failed
or something along the lines of "cl.exe" is not able to compile a simple test program
, then try to reinstall Windows Build Tools
along with the Windows SDK
from the Visual Studio Installer.