Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

c++ - How do I build Boost 1.55 with MinGW?

I have downloaded Boost 1.55 and MinGW.

The console answers me that I haven't any command. I can't understand how to bind two paths and activate the GCC compiler.

P.S.: If I build boost with Microsoft's compiler I will have about 8 mistakes with error 3861!!

How can I build it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

First make sure your mingw's bin directory is in your environment PATH so gcc and g++ is callable from your command prompt. Afterwards go into your boost's root directory of where you extracted the files.

Follow that with a bootstrap + b2.exe to build. For example, let's say you only want to compile the regex portion of boost. The follow commands should do the trick:

bootstrap gcc
b2 toolset=gcc regex

You can use:

b2 --show-libraries

to get a listing of modules you can build individually. Of course you can build all of them with just:

b2 toolset=gcc

Check out Boost Invocation for a detailed list of available options.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...