How to compile C++ boost library with Intel C++ compiler

来源:互联网 发布:薇诺娜淘宝旗舰店 编辑:程序博客网 时间:2024/04/29 18:55

1. Download the source file of boost from www.boost.org; install intel c++ compiler

2. Extract it into a directory as you like; say 

3.  configure the intel compiler environment variables

1) open a command terminal;

2) run the batch file compilervars, (in Windows, compilervars.bat, in Linux compilervars.sh and compilervars.csh) as intel_installation_dir/compilervars.bat -ia32;

3) do as the boost installation manual instructs(it can be found at index.html in the boost directory);

Note: step 3) must be done in the same terminal as step 2) since the set environment variables only has effect on the following commands in the same terminal; otherwise, in Windows, a small window would consistently pops up, saying files with some format cannot opened.

4. Up to now, the intel compiler should be starting the compilation boost library from the source code. After the compilation finishes, we can copy the produced libraries to the existing boost library which may be compiled by visual studio compiler at some time before. This can save us from creating another separate directory and setting another system environment variable.