Linux Programming Flashcards

1
Q

Where are usually location of executable in Linux

A

usr/bin

usr/loca/bin

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

Where is header file for system library?

A

usr/include
usr/include/sys
….

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

cc -o test test.c -lm

What is “-lm”

A

usr/lib/libm.a

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

Will Static library file name end with?

A

.a

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

Command to combine many objects to one single static library?

A

ar crv libfoo.a obj1.o obj2.o

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

How to specify search library location in compile command?

A

cc -o test -L. test.c -lfoo
or
cc -o test -L/usr/openwin/lib test.c -lX11

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

What is shared library end with?

A

.so

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