how do i install boost on my mac? [duplicate] - c++

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to install boost c++ libraries in OSX
I want to use boost to serialize some objects in my game, but I got stuck when I wanted to use boost.
So I have downloaded and unzipped boost into a dir.
Now what?

You might use macports which simplifies the installation of boost significantly.
Download macports from http://www.macports.org/
Run sudo port install boost
This will download an install boost automatically. And also install all dependencies of boost.
Wait until boost is compiled. Takes about 0.5h on my macbook pro.
Your boost library is then found at /opt/local/include/boost

I guess you should just try and follow the Boost Getting Started Guide.
Start reading Getting Started on Unix variants (e.g. Linux, MacOS), it should be a gentle yet complete introduction.

Related

boost on python on Mac

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.

How to install boost on Mac

Recently, I am learning multithreading in C++. And I use xcode to write c++.But how to install boost in latest version Xcode 7.0. I tried many ways but all of them failed. Besides,Why people prefer using thread library in boost, instead of thread library included in STL.

How do I remove installed C++ libraries in Ubuntu? [duplicate]

This question already has answers here:
What's the opposite of 'make install', i.e. how do you uninstall a library in Linux?
(13 answers)
Closed 8 years ago.
I recently installed it++, a C++ signal processing library, from http://itpp.sourceforge.net/4.3.1/index.html by downloading the zip file, doing cmake, make and make install.
I now want to completely undo the installation and re-install again. This is a basic question, but how do I remove it++ in Ubuntu? In general, what commands do I use to remove installed C/C++ libraries in linux?
Thanks.
The libitpp-dev package is available in Ubuntu:
https://launchpad.net/ubuntu/+source/libitpp
Read carefully the post that Ben suggested as duplicate in his comment -- What's the opposite of 'make install', ie. how do you uninstall a library in Linux? which suggests a reversal akin to the
# make uninstall
that was suggested by shengy in his comment, to be run in the directory from which you installed originally (re: bikram990)
Be sure to read carefully the comments to avoid common 'gotchas', including accidentally removing dependencies related to other packages.
As is stated in the answers of that post, the second option is figuring out the build steps and manually reversing them, using the
$ make -n uninstall
command to figure out what those were. If it turns out you do have to do some pruning manually, again, be wary of what you remove in case you accidentally break other packages in the process.
It is recommended to install the package via your package manager to avoid complications and possible problems such as this, especially if you're not 100% sure of what you're doing with cmake, or at least a little wary about how to proceed in the case of an uninstall.
The package can then be installed with:
$ sudo apt-get install libitpp-dev
And this very reason is a very good one to stick with official repositories/packages, as a reversal can be done with:
$ sudo apt-get uninstall libitpp-dev
And your package manager will handle the mundane details, such as dependency checking, updates, and will generally assure that you will not break any other packages when installing or uninstalling.
Additionally, your official package may contain some Ubuntu-specific patches.
It's understandable to install packages manually in the case that a particular package is not available through the official channels, but then you're privy to the whims of the particular package authors, who may not have tested functionality thoroughly on your particular system.
Good Luck.

C++ Development CodeBlock Ubuntu with Boost Library

I majorly work in Java but I have to switch to C++ for development for one project.
I done my research and find that in order to do portable code in C++, I need to use Boost or QT libraries etc. Therefore, now I download CodeBlock IDE in Ubuntu but afraid how to start building project. I search alot in the web to how to use Boost with CodeBlock but each time I only find it working/configure with Windows. http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef
Can please guide me regarding how to configure Boost library with CodeBlock in Ubuntu so that I can write Portable code.
Please also let me know if I am wrong in direction to write portable code which must be support in both Linux and Windows environment.
Have a look at http://www.boost.org/doc/libs/1_52_0/more/getting_started/unix-variants.html
If you dont't need the latest version of boost you should install boost on ubuntu using
apt-get install libboost*

Boost c++ library install

I am not familiar with the usual build technique in linux I am using boost c++ library. Can any body guide me in installing and configuring boost c++ library. Thanks in advance
My environment is Linux Fedora 15. On it, one can easily install boost by typing,
$ yum install boost-devel
After installation, you'll find boost under /usr/include/boost/.
However, if you run,
$yum install boost
you'll only find .so of boost under /usr/lib/, like /usr/lib/libboost_timer.so.1.48.0.
It's OK if you're not familiar with the usual build technique because Boost doesn't use the usual build technique. Follow the instructions in the "getting started" documentation. Make sure you read all the way to the bottom of the page. The link to the Unix-specific instructions is at the very, very bottom.
For most parts of Boost, installation is synonymous with unpacking the tarball into your preferred include directory. Other parts of Boost require compilation, so go to the Boost installation directory, run ./bootstrap.sh, and then run ./bjam install.
depending on the Linux distribution you are using, you'll probably find boost is already built and packaged for you, e.g. on Fedora "yum install boost"
Rob Kennedy's answer is still valid except that is recommended now to install with ./b2 instead of ./bjam.