Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TgBot.dll not found #304

Open
silincone opened this issue May 11, 2024 · 2 comments
Open

TgBot.dll not found #304

silincone opened this issue May 11, 2024 · 2 comments

Comments

@silincone
Copy link

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!

@llnulldisk
Copy link
Contributor

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

@silincone
Copy link
Author

silincone commented May 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants