Changes between Version 7 and Version 8 of PortingTips
- Timestamp:
- Dec 29, 2015, 4:15:34 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PortingTips
v7 v8 21 21 === Fix OS/2 DLL name in libtool === 22 22 23 When `libtool` is used to generate project DLLs, such a DLL often gets a version number in its name (e.g. `libpixman-1.so.0`, where `pixman-1` is the base DLL name and `0` is the major version number). However, on OS/2 the version information cannot follow the extension and hence it must be put into the name part. But the name part is limited to 8 chars so `libtool` has to cut the base DLL name by default to make the appended major version number fit the limit. In case of the `pixman` this would give us `pixman-0.dll` which looks misleading .23 When `libtool` is used to generate project DLLs, such a DLL often gets a version number in its name (e.g. `libpixman-1.so.0`, where `pixman-1` is the base DLL name and `0` is the major version number). However, on OS/2 the version information cannot follow the extension and hence it must be put into the name part. But the name part is limited to 8 chars so `libtool` has to cut the base DLL name by default to make the appended major version number fit the limit. In case of the `pixman` this would give us `pixman-0.dll` which looks misleading (the correct name is `pixman10.dll` in this case). 24 24 25 A proper solution in this case is to force `libtool` use a special, short version of the base name for the DLL file (and only for it — all other files, such as the import library name, should carry the original name so that the linker can recognize it). This is done using the `-shortname` libtool option. Where to add it varies from project to project but the typical place is the _la_LDFLAGS variable in Makefile.amfor the library. See r1232 for a real-life example.25 A proper solution here is to force `libtool` use a special, short version of the base name for the DLL file (and only for it — all other files, such as the import library name, should carry the original name so that the linker can find it). This is done using the `-shortname` libtool option. Where to add it varies from project to project but the typical place is the _la_LDFLAGS variable in `Makefile.am` for the library. See r1232 for a real-life example.