First question on boost. Just downloaded the boost library. I am going to use it on Windows right now. Do I need to build it before I can use it? or I can include all its source files into my project to get my project built? If I need to build it, can I use Cygwin g++ to build it or I have to use Microsoft compiler to do it? thanks, James
AMDG Longyu Mei wrote:
First question on boost.
Just downloaded the boost library. I am going to use it on Windows right now.
Do I need to build it before I can use it?
It depends on which libraries you use. Most are header only and don't require any building.
or I can include all its source files into my project to get my project built?
I believe that you can do so.
If I need to build it, can I use Cygwin g++ to build it or I have to use Microsoft compiler to do it?
You need to build any libraries with the same compiler that you build your own code with. In Christ, Steven Watanabe
If I need to build it, can I use Cygwin g++ to build it or I have to use Microsoft compiler to do it?
No problem to use cygwin, that's what I do. You can either compile cygwin apps or win32 native apps. I compile the libraries first (2 versions: cygwin and mingw32). I can then use the one I want. As it took me quite a long time to understand how to get it work on cygwin, I give you below my notes. Good luck, Fred - to build boost for windows (cygwin independant) from cygwin: - unzip $ tar xvfj boost_1_35_0.tar.bz2;mv boost_1_35_0 boost_1_35_0_msw; cd boost_1_35_0_msw - build jam: $ configure --without-icu --without-libraries=python --prefix=/cygdrive/d/Softs/boost_msw - change Makefile: - BJAM_CONFIG=-d2 -j2 link=static threading=multi runtime-link=shared --layout=system - LIBS=--without-python release - change user-config.jam: replace "using gcc ;" by: "using gcc : : : <cflags>-mno-cygwin <cflags>-DBOOST_WINDOWS_API <cxxflags>-mno-cygwin <cxxflags>-DBOOST_WINDOWS_API <compilerflags>-mno-cygwin <compilerflags>-DBOOST_WINDOWS_API <linkflags>-mno-cygwin ;" - build boost: $ make install - to build boost for cygwin from cygwin: - unzip $ tar xvfj boost_1_35_0.tar.bz2;mv boost_1_35_0 boost_1_35_0_cyg; cd boost_1_35_0_cyg - build jam: $ configure --without-icu --without-libraries=python --prefix=/cygdrive/d/Softs/boost_cyg - change Makefile: - BJAM_CONFIG=-d2 -j2 link=static threading=multi runtime-link=shared --layout=system - LIBS=--without-python release - change user-config.jam: replace "using gcc ;" by: "using gcc : : : <cflags>-DBOOST_POSIX_API <cflags>-DBOOST_POSIX_PATH <cxxflags>-DBOOST_POSIX_API <cxxflags>-DBOOST_POSIX_PATH <compilerflags>-DBOOST_POSIX_API <compilerflags>-DBOOST_POSIX_PATH ;" - build boost: $ make install Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
Longyu Mei schrieb:
Just downloaded the boost library. I am going to use it on Windows right now.
Do I need to build it before I can use it? or I can include all its source files into my project to get my project built? If I need to build it, can I use Cygwin g++ to build it or I have to use Microsoft compiler to do it?
The getting started guide will help you with the first steps: http://www.boost.org/doc/libs/1_35_0/more/getting_started/index.html Regards James
participants (4)
-
frederic.bron@alcan.com
-
Jean-Pierre Bergamin
-
Longyu Mei
-
Steven Watanabe