#How to make botan.lib on Windows 10 for C++
51 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
When doing nmake on VS 2022 just get "Trying to compile Botan configured as x86_64 with non-x86_64 compiler."
but its all 64bit
if their instructions aren't cooperating for manually building it, it looks like the project is supported by the vcpkg package manager. there should be a way to get it that way on windows throught visual studio (i don't know the specific of how you'd have visual studio fetch it for you though).
if you want to try it out with cmake + visual studio you can use this template i use for a lot of my random projects. if you click the "use this template" button on the main repo page it'll create a copy of it to work off of in your github account: https://github.com/vorlac/cmake-vcpkg-project-template
then once you have that repo (from your gh), just clone it and make similar changes to what you see in this commit... but instead of glfw and glad, you'd be adding botan as the library your project will depend on instead. then main.cpp would be the program you implement with it... https://github.com/vorlac/cmake-vcpkg-project-template/commit/275e7b65b1a8640bb8eac7717a056ef09c648c12#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
from there just open it up in VS2022 (as a folder) and it should start configuring automatically if you have the cmake extension installed for it.
windows x64?
Yes
i can just build it for you real quick
@tribal igloo Has your question been resolved? If so, type !solved :)
why does it need to be 2.11.0?
that's probably going to complicate things a bit if vcpkg doesn't handle that older version easily
there's an experimental cmake build
the python script can generate it iirc
been a while since i built that lib
but it's definitely possible to build it on windows, i've done it before
can someone build this if possible i litt just need .libbbbbbb
do note that windows has built-in ssl support ofc
you don't need a third-party lib
you can just use win32
if you just need an ssl library (and don't want to use win32 for some reason), the repo i linked to is already configured to build openssl and link it to the example program created from main.cpp
so i have the boton 3.1 lib file if you want it. it's a massive lib file... somehow it's almost 500MB
everything compressed fairly well so i just tossed all build artifacts in there:
it has the debug and release builds of the .lib
you may have some luck finding the older version of the lib file using something like cygwin to grab it if it happens to be one of the thousands of binaries you're able to get from the cygwin package manager
are you able to get one for 2.11
this is a mingw64 build for windows x64 from the 2.11 branch, you should still be able to load it the same way you would a .lib file though
it doesn't include any features that come from external dependencies though
getting that to build will take more time that i'm willing to commit. you only got that lib file since it was 2 commands to build it haha
this is all that needed to be run after cloning their repo and checking out the 2.11 branch in case you end up needing to build it yourself with different options...
python ./configure.py --os mingw --cc gcc --cpu x86_64 --prefix=./botan-2-11
make.exe install
here's everything it installed from the output of that build in case you also need the include dir and anything else in there
@tribal igloo decided to try building it with msvc while watching some tv. this should be exactly what you needed
to build it using msvc:
- open one of the special terminals in here (assuming you have VS2022 installed):
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2022\Visual Studio Tools\VC
I used this one specifically:
x86_x64 Cross Tools Command Prompt for VS 2022
- from their repo pointing to the 2.11 branch, run:
python ./configure.py --os windows --cc msvc --cpu x86_64 --prefix=./botan-211-install
- run:
nmake all
nmake install
after that stuff is done running, you should find the files in a folder named "botan-211-install" (or whatever you passed in as that --prefix arg)
Thank you so much for this bro
this occurs
but in the
did you define the include path to point to the one that was bundled in that zip file?
I mean its all in vendor
@tribal igloo Has your question been resolved? If so, type !solved :)