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
Post a Comment