Newbie: Boost for Windows"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie: Boost for Windows"

John Read
David Abrahams <dave_at_[hidden]> wrote:
 
>That's a tough row to hoe. MinGW is a non-cygwin toolset. If you try
>to build bjam under cygwin, you'll get a cygwin version of bjam. I
>suggest you remove MinGW/bin from your path (maybe even uninstall
>MinGW) and use the gcc-nocygwin toolset
>(http://www.boost.org/tools/build/v1/gcc-nocygwin-tools.html) *or* you
>give up on the cygwin environment and use the MinGW toolset from a
>regular windows command prompt.
 
 
It is not cygwin per se. I simply would like a proper shell to do my work in. Would using the MSYS command prompt make my row any less rocky?
 
Also, when I use a DOS prompt and run build.bat from the jam_src directory, I seem to use the msvc toolset. This generates a bin.ntx86 directory with a bjam.exe.
 
Looks like I am still not getting the toolset pointing to the gcc compiler.
 
Is there any doc on how to compile Boost using the MinGW toolset and the gcc compiler on windows (preferably with some useable shell, not the DOS prompt)?
 
If no, I will be glad to document this for us all when I get it sorted.
 
Thanks,
John
 


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Boost for Windows"

David Abrahams
John Read <[hidden email]> writes:

> David Abrahams <dave_at_[hidden]> wrote:
>    
>   >That's a tough row to hoe. MinGW is a non-cygwin toolset. If you
> try
>>to build bjam under cygwin, you'll get a cygwin version of bjam. I
>>suggest you remove MinGW/bin from your path (maybe even uninstall
>>MinGW) and use the gcc-nocygwin toolset
>>(http://www.boost.org/tools/build/v1/gcc-nocygwin-tools.html) *or*
>> you
>>give up on the cygwin environment and use the MinGW toolset from a
>>regular windows command prompt.
>    
>    
>   It is not cygwin per se. I simply would like a proper shell to do my
> work in.

Yes.  What's your problem with gcc-nocygwin?

> Would using the MSYS command prompt make my row any less rocky?

On windows, building bjam is only supported under CMD and cygwin bash,
and I don't know how well either such bjams can run under MSYS.

> Also, when I use a DOS prompt and run build.bat from the
> jam_src directory, I seem to use the msvc toolset. This generates a
> bin.ntx86 directory with a bjam.exe.  

What's wrong with that?

> Looks like I am still not getting the toolset pointing to the gcc
> compiler.

You just built the build tool.  Now you can use any of the toolsets
described at http://www.boost.org/more/getting_started.html to build
Boost.

> Is there any doc on how to compile Boost using the MinGW toolset and
> the gcc compiler on windows (preferably with some useable shell, not
> the DOS prompt)?  If no, I will be glad to document this for us all
> when I get it sorted.  Thanks, John

If you want mingw-style executables without using CMD, use
gcc-nocygwin from the bash prompt.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: Boost for Windows"

Dave Compton
In reply to this post by John Read
Hi John,

    I've been working in Windows for several months in exactly the
manner you describe.  It works fine but it took a while to figure out
how to set things up.  Here is what works:

0) Get/install Cygwin:  full install - use unix style linefeeds.
1) Get/install MingGW:  MinGW-5.0.2.exe
2) Get/unpack  Boost: boost_1_33_0.tar.bz2 - boost_1_33_1 has a few
build failures but boost_1_33_0 compiles cleanly.
3) Open Cygwin terminal and added MinGW/bin to path
4) cd to boost_1_33_0/tools/build/jam_scr
5) use the windows cmd "shell" to build bjam for mingw as follows: "cmd
/C build.bat mingw"
6) Add <boostDir>/boost_1_33_0/tools/build/jam_src/bin.ntx86 to your
path to get bjam
7) Build boost: bjam "-sTOOLS=mingw" --prefix=<boostInstallDir> install
 > build.res 2>&1

The format for <boostInstallDir> should be something like
c:/boost/boost_1_3_0/install .  Use forward slashes and a dos style
directory name like "c:"

When compiling, use '-I<boostInstallDir>/include/boost-1_33' to get the
boost include files.

When linking, use '-L<boostInstallDir>/lib to get the boost libraries.

At runtime, if you link with shared libraries, you will need to have
c:\MinGW\bin and <boostInstallDir>\lib in your PATH environment
variable.  In this case slashes should be backslashes.  Also, I ran into
problems when the path environment variable contained directories from
different disks so it makes life easier if you put you mingw
installation on the same disk as your boost installation.

- Dave



_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users