Compile the libgdiplus source to create a statically linked library, i.e. libgdiplus.so

I downloaded the libgdiplus source from https://github.com/mono/libgdiplus/archive/master.tar.gz

How do I compile it to create a statically linked library? The reason for this is because I do not want the user to install all the dependencies that libgdiplus.so requires to run the program.

I tried ./configure --enable-static and ./configure LDFLAGS=-static and checked the output in the /src/.libs directory, but I did not find a statically linked shared object library there. I want to distribute it using my program that uses the built-in Mono.net.

Thanks Omkay

+7
c ++ gcc mono configure
source share
1 answer

General:

 ./configure --enable-static --prefix=/usr mkdir SOMEDIR INSTALL_ROOT=SOMEDIR make INSTALL 

should simplify the search.

Also, be careful that to obtain an archive without dependencies, you will need all the libgdiplus dependencies available as static archives. If some of them are installed only as shared objects, programs related to your libgdiplus.a will need these .so dependencies at runtime.

0
source share

All Articles