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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -