c++ - Correct way to link with /usr/lib/libgtest_main.a? -


i got libgtest-dev installed , brought me /usr/lib/libgtest_main.a , /usr/lib/libgtest.a.

now trying link simple test application. following command produces me functional executable:

g++ -pthread sample1.o sample1_unittest.o /usr/lib/libgtest.a /usr/lib/libgtest_main.a 

is there way instruct linker search .a files? there way assemble application in 1 step (compile , link)?


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -