Unable to disable shared-libraries

Xi Ruoyao ryxi@stu.xidian.edu.cn
Tue Jun 12 12:30:00 GMT 2018


On 2018-06-12 17:46 +0530, Ajay Garg wrote:
> Oh, sorry for that (and thanks for the quick reply ..).
> 
> Just a quick-question, is there a gcc option that can disable
> compilation of *any* shared-libraries at gcc's level?

You can write a shell script wrapping GCC to do that.  But I don't think it
would be useful as the building process won't continue because of missing
libraries.

leptonica's CMake building system seems to use "cmake -DSTATIC=yes".  And its
Makefile (src/makefile.static) doesn't produce shared libraries by default
(DON'T -DSHARED=no! just `make -f makefile.static`. It actually just tests
if SHARED is defined and doesn't check the value).  For autoconf building
system (configure script) --disable-shared should work.
-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University



More information about the Gcc-help mailing list