KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Fist i am confused should i set libraries under Linker/Libraries or to set them under "path and symbol". i think that they are the same. am i correct? any way for my question - i need to link static library , so i tried few things: First try I try to add gtest (this is the library) and gtest path in the link library. in this way its compiled and linked correct , but failed in runtime , because when it tried to load shared library ( i want static library ! ) error is error while loading shared libraries: libgtest.so.0 Second try - I try do define it in path and symbol add to libraries the complete path '/root/workspace/gmock/gtest/lib/.lib/libgtest.a' . in this case i got error in the linkage : g++ -L/root/workspace/gmock/lib/.libs -L/root/workspace/gmock/gtest/lib/.libs -o "playground" ./src/p.o ./src/playground.o -lpthread -l/root/workspace/gmock/gtest/lib/.lib/libgtest.a -l/root/workspace/gmock/lib/.lib/libgmock.a /usr/bin/ld: cannot find -l/root/workspace/gmock/gtest/lib/.lib/libgtest.a This post dosnt give an answer and not explain how you define differently linked against static vs shared. Thank you
Tags (comma-separated)
Save Edits
Cancel