Unix Tools Flashcards

1
Q

How would you build foo.cpp using the C++14 standard with LLVM, with all warnings, and DEBUG defined, outputting to binary ‘myapp’?

A

clang++ -std=c++14 -Wall -D DEBUG -o myapp foo.cpp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you list details of the clang++ compilation (e.g. flags and paths used)?

A

Pass the -v option.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you specify the include and lib dirs?

A

-I -L (/usr/local/include and /usr/local/lib are the defaults).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly