2

I want to develop a C++ library that can be used on multiple Linux distributions like RHEL, Suse, Ubuntu etc...

If I compile my source code into a .so (shared library) on one Linux environment(say RHEL), will it work on other environments also without being recompiled?

Are the gcc and C/C++ libraries different in different environments?

1 Answer 1

1

If I compile my source code into a .so (shared library) on one Linux environment(say RHEL), will it work on other environments also without being recompiled?

In general, no. You want to use a build system that supports portability. Autotools is the standard. An alternative is Cmake.

2
  • Thanks for the answer, how can Autotools/Cmake generate distribution neutral builds. Sorry, I am new to Linux world. Nov 18, 2014 at 12:55
  • @RaviChandra Kind of big question, and can't be easily answered in a few words, sorry. Do a search for documentation for autotools (automake, autoconf, libtool) and cmake. Nov 18, 2014 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .