I have a C ++ project (g ++ / raw Makefile) designed for linux, I used everything that worked fine for ages for a static connection. Now I want to create binaries both statically and dynamically linked. The following command is used in my Makefile to create a dynamic library (e.g. libtest):
$ (CXX) -shared -Wl, -soname, libtest.so.1 -o libtest.so.1.0.0 $ (LIBTEST_OBJS)
The output is libtest.so.1.0.0, which has the name libtest.so.1
I found at least a symbolic link libtest.so -> libtest.so.1.0.0 to link my client program, which actually uses the libtest.so.1.0.0 library above.
Here is my question: do I want to create my own software, what is the standard way to manage the aforementioned symbolic link? It is clear that I do not want this extra material in my source directory, but I need to build my client binary, should I create it as a temporary link to create the client, and then just delete it when it is done? or should I create a directory to host the .soso library and its links and leave everything there until I βdo the installationβ to install them in the other specified directories? It will be great what is the standard way to do this.
Or maybe the wrong way to generate libraries? should I just generate libtest.so (as the actual library, not the link) to link my executable and then rename the library and create these links when doing `` make install ''?
any input would be appreciated. :)
Lei
source
share