Go to the first, previous, next, last section, table of contents.
Libtool was first implemented in order to add support for writing shared libraries in the C language. However, over time, libtool is being integrated with other languages, so that programmers are free to reap the benefits of shared libraries in their favorite programming language.
This chapter describes how libtool interacts with other languages, and what special considerations you need to make if you do not use C.
Creating libraries of C++ code should be a fairly straightforward process, because its object files differ from C ones in only three ways:
The conclusion is that libtool is not ready for general use for C++ libraries. You should avoid any global or static variable initializations that would cause an "initializer element is not constant" error if you compiled them with a standard C compiler.
There are other ways of working around this problem, but they are beyond the scope of this manual.
Furthermore, you'd better find out, at configure time, what are the C++ Standard libraries that the C++ compiler will link in by default, and explicitly list them in the link command line. Hopefully, in the future, libtool will be able to do this job by itself.
Go to the first, previous, next, last section, table of contents.