开发者

Assuming GCC and G++ are installed how to compile a file which uses boost library? (threading)

So I am new to linux stuff. I have set linux Debian up, I have gcc installed. I have a simple C++ file that uses boost threading library. Let us call that file example.cpp we have exect path to开发者_如何学Python it. how to compile it? (sorry I came from windows world=)


Assuming example.cpp is in the current directory, this will create an executable called example, linked against boost-thread. g++ will search the system library locations for the library.

g++ example.cpp -lboost-thread -o example

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜