Installation, and requirements

The LibCXX Windows Library should be converted into an installable package, instead of building and installing the LibCXX Windows Library directly. The source tarball includes a canned build script for Fedora. Running rpmbuild -ta libcxxw-version.tar.bz2 creates the following packages:

Use the following documentation as a guide for preparing an installable the LibCXX Windows Library package on platforms other than Fedora.

Requirements and prerequisites

Note

Linux distributions typically have separate runtime and development packages for these libraries. In all cases, the development packages must be installed to build LibCXX Windows Library, and only the runtime packages are required to run the applications.

Configuring and building

As mentioned above, the LibCXX Windows Library should be built into a standalone, installable package. Use the following documentation as a guide to create an installation script or a package.

Run the configure script, followed by make (or gmake), and make install. configure takes the usual options that specify non-default installation directories for various files (see configure --help). Additional options are:

--with-pkgconfigdir=dir

Specifies where pkgconfig configuration file gets installed. The configure script goes through the list of some common directories, and checks if they exist.

This option may be needed to override the default even if configure finds it, and does not complain, if it ends up finding and installs its pkgconfig file into the wrong directory.

Run (g)make install DESTDIR=/tmp/libcxxw-install. This creates an installation image in the /tmp/libcxxw-install directory, to use as a basis for creating an installable package. A plain (g)make install will do it for real, of course. However, using an installable package is strongly recommended.

In addition to (g)make install, the cxxwtheme.desktop should be included in the installable package, and placed in the desktop application directory (usually /usr/share/applications).

Developing applications with the LibCXX Windows Library

See LIBCXX's autotools instructions. The LibCXX Windows Library uses the same build framework. In configure.ac:

LIBCXX_INIT
LIBCXXW_INIT

LibCXX's LIBCXX_INIT gets supplemented by LibCXX Windows Library's LIBCXXW_INIT, The Makefile.am can also use LibCXX's @LIBCXX_AM@, if needed, and applications link with -lcxxw and -lcxx

@LIBCXX_AM@

bin_PROGRAMS=main
main_SOURCES=main.C
main_LDADD=-lcxxw -lcxx

Packaging different versions of the LibCXX Windows Library

It is possible to install multiple versions of the LibCXX Windows Library to accomodate software that gets built with different versions of the LibCXX Windows Library. See LibCXX's documentation for more information. The same process gets used for the LibCXX Windows Library too.

LibCXX Windows Library's compatibility package does not have:

  • The tools in $bindir (the cxxw and cxxwtheme commands.

  • The cxxwtheme desktop file, cxxwtheme.desktop (usually in /usr/share/applications, see above).

  • Manual pages in $mandir.

The compatibility packages contents are, only:

$libdir/libcxxw-$version

This directory whose name includes the LibCXX Windows Library and LibCXX's API/ABI versions contains the runtime libraries. Multiple concurrently-installed version of the LibCXX Windows Library get installed into different directories in $libdir.

$includedir/libcxxsw-$version

This directory whose name includes the LibCXX Windows Library's and LibCXX's API/ABI version contains the header files. Multiple concurrently-installed version of the LibCXX Windows Library install their header files into different directories in $includedir.

$datadir/libcxxsw-$version

This directory whose name includes the LibCXX Windows Library's and LibCXX's API/ABI version contains LibCXX Windows Library's visual schemes. Multiple concurrently-installed version of the LibCXX Windows Library install their header files into different directories in $includedir.

Only the primary LibCXX Windows Library package provides the cxxwtheme to switch display themes. A compatibility LibCXX Windows Library library tries to use its corresponding theme with the same name as the primary's package, falling back to the default theme if necessary.

The pkgconf/pkg-config and aclocal autoconf macros

The LibCXX Windows Library installs a package configuration files and an autoconf macro files into the shared, global pkgconfig and aclocal directories. The names of these files include the LibCXX Windows Library version, making it possible to install multiple versions of these files, corresponding to each installed version of the LibCXX Windows Library.

Re-targeting to a different version of LibCXX Windows Library

Re-targeting code that gets compiled with the LibCXX Windows Library to use a different version of the LibCXX Windows Library, if that's possible, follows the same general process LibCXX's, and sets the LIBCXXW_VERSION environment variable which gets checked by the LIBCXXW_INIT macro. This is the LibCXX Windows Library's API/ABI version number which is, generally, the LibCXX Windows Library version without the minor release level. One way to obtain the API/ABI version number is that it gets included in the name of the lib subdirectory where LibCXX Windows Library's runtime libraries get installed.

Note

The version label that gets included in the name of the lib subdirectory includes both the LibCXX Windows Library and LibCXX's API/ABI versions. Only the LibCXX Windows Library's ABI version gets specified by LIBCXXW_VERSION. The LibCXX version gets specified by LIBCXX_VERSION.