Search code examples
c++linuxshared-librariesconfigurebuilding

how to compile, setup, and make a library .so as shared in linux


I am new to linux compiling an opensource shared library.

after I downloaded, let say gTest from google, I unzipped the folder.

cd gtest.x.x.x

then

configure

then I did,

make all

a bunch of compilation, then linking is expected, am I right?

and then after the make all is over, I checked lib folder, to just find

libgtest.la and libgtest_main.la

  1. is my expectation on the spot, or I am missing something?
  2. after a good compilation, or successful one, the library is ought to be fund in the folder lib, isn't?
  3. what should I do now, and how to find out what I did wrong?

I should expect .so file, NOT .la

Edit, when I do make install I get the following output: 'make install' is dangerous and not supported.


Solution

  • the library fiels that contains .sc files and so ar in a hidden folder inside lib folder.

    after make all go the following path

    libraryProject/lib/.lib

    there is a hidden lib folder inside lib folder.

    gtest/lib/.lin/libName.so