Problem compiling glib using static zlib

Hello I have been trying to compile glib 2.28 with needs Zlib. During the compilation process I received these messages

Then giving a look at the configure of Zlib, there was an option to static link it and I obviously used it.

So I think I can solve it by compiling a shared zlib, or by compiling the glib libraries statically static, but I would like to try to use this -fPIC flag to generate shared glib libraries from a static Zlib. Then I edited the glib Makefile, and where there was

I added a

in the end. Then I typed

again, but the error messages remains. Can I do anything?
Many thanks.

I'm not convinced -fPIC makes sense for static code.

Make sure you're using the right object. A .a file is usually used with an .so file.

1 Like

Well, that's the only library file created. The rest are two include files and a man file.

What compile flags are libgio being compiled with?

I looked into the Makefile and didn't see anything with libgio in there. What should I look for?