Pregunta

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.

¿Fue útil?

Solución 2

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

Otros consejos

*.la objects are libraries too that's why you can find them in the lib folder. But they aren't shared. *.so (so stands for Shared Object).

When you run the rule all (make all) or just make. You are ordering to the make command that runs all rules as are written in to the Makefile file.

In this file(there are others, like CMakeList, etc ...) is where developers write (among others things) how should the program/library compile and link. So, if the Makefile, by default compile gTest libraries as static (I think that is the case) you don't will find any *.so .

Try adding the --shared flag when building the libraries. Also you should read some info about gTest and find out if the authors put it that way because an specific reason.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top