The latter is especially prominent since the text editor allows creating and editing code blocks with ease. For these reasons, the newcomers to macOS are looking for Notepad equivalents, which will allow them to effectively handle code. The software market offers countless apps and code editors that are compatible with Apple devices. There used to be an option to delete files securely in older versions of Mac OS X. However, I am unable to find the same in macOS High Sierra 10.13.5. Is the option removed?
High Sierra Os Mac
Boost is a set of libraries for the C++ programming language that provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains over eighty individual libraries.[2]
The other interesting points of Boost are :
- Open source
- Cross platform
- Complement to STL rather than a replacement
- Many of Boost developers are on the C++ standard committee
- Well documented
- Most of the Boost libraries are licensed under the Boost Software License, designed to allow Boost to be used with both free and proprietary software projects
Installation Boost
Before jumping into steps of configuring Boost on various IDE, let’s begin with Boost installation. To be noted that on this post I run Xcode on OS X, Code::Blocks on Linux (Ubuntu) and Visual Studio on Windows. The detail environments I use are :
- OS X 10.11.4 El Capitan
- Ubuntu 14.04.4 LTS
- Xcode Version 7.2
- Code::Blocks 13.12, gcc 4.8.4
- Visual Studio 2013
- Boost 1.60.0
OS X and Linux (Ubuntu)
There are several ways of Boost installation. Instead of build from source code, we can use package manager such as MacPorts, Homebrew, Advance Package Tool, etc. In this post we will build Boost from source code. The installation steps (from source code) on OS X and Ubuntu are the similar. To make it consistent, I use the same installation path for OS X and Ubuntu that is /usr/local/boost_1_60_0
. You can use different path if you want. The steps are :
- Download boost library from Boost website
- Extract it.
- Open terminal, navigate to the extracted directory
- Create directory on
/usr/local/boost_1_60_0
, and ensure IDE has access to the directory. On my case I don't need this step on OS X, but on ubuntu it does. - Run command :This last step quite take time. So you can have coffee while waiting for it :)
Once the installation finish, we should have generated directory. They are /usr/local/boost_1_60_0/include
contains header files and /usr/local/boost_1_60_0/lib
contains libraries.
Windows
The Boost installation step on Windows is also similar to the installation step on OS X and Ubuntu.The steps are :
- Download boost library from Boost website
- Extract it to C:boost_1_60_0
- Open Visual Studio command prompt. I use Visual Studio 2013 x86 Native Tools Command Prompt native tool (I have not test using default Windows Command Prompt)As on OS X and Ubuntu, the last step quite take time.
Configure Boost on IDE(s)
Before create C++ projects on various IDE, let’s create a simple C++ hello world code that use Boost libraries. To simplify the test, I grab sample code from here
The snipped code above just print text and write it to a text file. We just want to ensure the IDE’s compiler can compile and build the code that includes Boost libraries.
Xcode
To include Boost libraries on Xcode project :- Select Xcode project > Build Setting
- Add
/usr/local/boost_1_60_0/include/
to the Header Search Paths - Add
/usr/local/boost_1_60_0/lib/
to the Library Search Paths
Code::Blocks
To include Boost libraries on Code::Blocks project :- Right Click on Code::Blocks project > Build Option
- Select Compiler tab, add
/usr/local/boost_1_60_0/include/
- Select Linker tab, add
/usr/local/boost_1_60_0/lib/
Visual Studio
To include Boost libraries on Visual C++ project :- Right Click on VC++ project > Properties
- Select VC++ Directories on the left pane
- Add
C:boost_1_60_0
on Include Directories item - Add
C:boost_1_60_0stagelib
on Include Directories item - Click OK to close the dialog
Mac Os High Sierra Update
The last is rebuild the above code on selected IDE. We should not got any errors once the IDE can detect the Boost directory path.
The sample of this article can be downloaded here