Rella
Rella

Reputation: 66975

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 it. how to compile it? (sorry I came from windows world=)

Upvotes: 0

Views: 499

Answers (1)

James
James

Reputation: 25543

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

Upvotes: 2

Related Questions