TgBot.dll not found
silincone opened this issue · comments
As the title suggests, visual studio 2022 was not being able to find TgBot.dll. I did install it through vcpkg. Several times because visual studio told me that reinstalling might work, but it didn't. I use windows 11 and for any further assistant required from my side will be provided to make this work. As of now, I'll just leave this, tell me what you will need to tackle my problem, please, help!
Did you change the include paths in the CMakeLists.txt
according to your vcpkg installation?
https://github.com/reo7sp/tgbot-cpp?tab=readme-ov-file#setup-project-with-cmakelists
I will tell you all the errors I encountered while trying to install TgBot in my local system.
Firstly, I went through all the steps that are needed to install TgBot libraries and includes in the C:\dev\vcpkg\
Then, I tried to compile the echobot-submodule program. As mentioned in the ReadMe, I removed
/usr/local/include
from the line 13 and changed
/usr/local/lib/libTgBot.a
to C:/dev/vcpkg/installed/x64-windows/lib/TgBot.lib
in the line 22.
So, I thought it would compile but, CMake fails successfully because it couldn't find OpenSSL library. I searched for a solution and found this and so, I wrote a new line of code before the find_package(...)
, i.e.,
include(C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake)
UPDATE:
After doing all the things mentioned here, if I remove the above line of code ( include(C:/...)
), cmake compiles and builds successfully, I don't know why though.
END_OF_UPDATE
Next, cmake builds smoothly and then I get errors saying "The code execution cannot proceed because TgBot.dll was not found. Reinstalling the program may fix this problem". So, I reinstalled it. Restarted the my whole system but it did not work.
Then, I watched this video and also this video and tried to do it without cmake. I did as the video suggested and put the TgBot.dll to the root where my debug .exe was present. Built it again and got the same error but this time it was libssl-3-x64.dll, I got mad and put all the .dll's I could find in the vcpkg installation to the root where my debug .exe file was present.
Now there are not .dll errors but I get this exact error