#How to make botan.lib on Windows 10 for C++

51 messages · Page 1 of 1 (latest)

tribal igloo
zealous pebbleBOT
#

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.

tribal igloo
#

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

main spear
#

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.

tribal igloo
#

I just need the .lib file and can’t find it anywhere

#

😃

main spear
#

windows x64?

tribal igloo
#

Yes

main spear
#

i can just build it for you real quick

tribal igloo
#

2.11.0

#

Yes please Ty so much

zealous pebbleBOT
#

@tribal igloo Has your question been resolved? If so, type !solved :)

main spear
#

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

tribal igloo
#

becasue that is what I am working wth

ancient linden
#

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

tribal igloo
#

can someone build this if possible i litt just need .libbbbbbb

ancient linden
#

do note that windows has built-in ssl support ofc

#

you don't need a third-party lib

#

you can just use win32

main spear
#

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

tribal igloo
main spear
#

so i have the boton 3.1 lib file if you want it. it's a massive lib file... somehow it's almost 500MB

tribal igloo
#

yes send it

#

ill take anything at this point

main spear
#

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

tribal igloo
main spear
#

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

main spear
#

@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:

  1. 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
  1. from their repo pointing to the 2.11 branch, run:
python ./configure.py --os windows --cc msvc --cpu x86_64 --prefix=./botan-211-install
  1. 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)

tribal igloo
#

this occurs

#

but in the

main spear
#

did you define the include path to point to the one that was bundled in that zip file?

tribal igloo
#

I mean its all in vendor

zealous pebbleBOT
#

@tribal igloo Has your question been resolved? If so, type !solved :)