I am trying to install boost library for c++ in windows. I am using a GCC compiler. I searched for it on the internet but everywhere the only installation of boost library in visual studio is given.
I found somewhere to go to boost/tools/build and then to run bootstrap.sh, but the following error is being shown:
C:\Program Files\boost_1_73_0\tools\build>bootstrap.sh The system cannot execute the specified program.
How should I resolve this issue?
https://www.boost.org/doc/libs/1_73_0/more/getting_started/windows.html#install-boost-build
here is instruction to install boost on windows. File you want to open is shell script (probably taken from Linux instructions), which generally should not be called on Windows. Use bootstrap.bat instead.
Related
I'm going to teach students to use SFML with C++, and I'm afraid the school doesn't have visual studio C++ installed, or will be a bit heavy to use for those students.
I want to have a plan B and have the option of a simple makefile that I can build on windows with SFML.
https://www.sfml-dev.org/download/sfml/2.5.1/ this page offers binaries compiled with different, specific versions of mingw with their respective mingw package links, unfortunately mingw doesn't include an unix terminal, like the one included with git-bash, so I can run a makefile.
What are the steps required to have a problem unix terminal, running in windows, minsys, msys2 or not, that can work well with those mingw packages? I have trouble finding help or proper instructions.
You want https://www.msys2.org/
It provides bash terminal and already contains mingw compiler. Perhaps it even has SFML packages already.
I have been using the minGW64 compiler with Visual studio code on windows for some time. However, there are certain limitations to it when it comes to certain libraries. The absence of a make tool and the inability to execute a config script while compiling a c++ program being the main ones. I came to know of MSYS, a tool provides a UNIX environment that allows us to do certain things that are forbidden by the windows terminal. I installed it but I saw that I need to install mingw64 again, from within the terminal to use it with MSYS2.
My question is, is there no way I can use my earlier mingw copy with this installation of MSYS2? Is there some difference between the mingw64 that comes with MSYS2 and the standard installation?
I am trying to use boost library on Python. In C++ I include boost\python.hpp but it says it cannot open pyconfig.h. How should I do that? I have a Mac with Parallels installed and my C++ code is in Visual Studio on Parallels. I installed homebrew and boost from the terminal, I already had boost on the Parallels side which I have used different times in C++. In short, I did a mess. How can I fix this?
Thanks!!
You need to find pyconfig.h on your machine, then add its directory to your build like -I/some/path. Often it will be in a directory called python3.7 or whatever version you have.
I am trying to install the boost library on windows 10, the first few steps are working:
Downloading the library
Unzipping
Bootstrapping
But then when trying to run b2.exe or bjam.exe there is nothing happening (except high CPU load), but no console output whatsoever, not even an error.
I can't find any explanation or help on the internet, maybe some of you got an idea
Since you've mentioned you're working on Windows, maybe Visual Studio is appropriate for your choice. In such case, you can use vcpkg tool to install boost. Check this link.
Once the tool is installed, it's really easy to install various libraries and they will automatically be detected in your Visual Studio projects. To install boost simply run vcpkg install boost:x64-windows.
I would like to install Boost library without the need of Visual Studio compiler, preferably by downloading the pre-compiled binaries. We are working on a cross-platform C++ project in Eclipse, so VS is out of option.
About a year ago, I found an installer, but it does not longer exists.
The best match I have found so far is from:
http://www.boostpro.com/download/
but it seems like this one includes a lot of stuff related to VS.
If there is no installer available, is there an easy way of compiling it like the on *NIX platforms?
(I know that the majority of the library is header-only, but I would like some parts which are not)
Whichever toolchain that you are going to use on Windows, you can use that toolchain to compile Boost easily.
For example, if you use Eclipse CDT for C++ on Windows, you can use either MinGW or Cygwin toolchain. Then simply start the command prompt that has those toolchains (make, gcc, ...) in your path. Go to the Boost folder you downloaded. Run the bootstrap file to generate bjam. Then run bjam.
On a side note, if you want a cross-platform C++ project, you don't have to use a cross-platform IDE. You can use CMake as your build generator and then use any IDE you want.
One option is to get the full Boost source and then compile your own application to statically link in everything from Boost. If you manage to do this correctly, there will be no need to bundle the Boost binaries on any platform.