Sponsored Content
Top Forums UNIX for Advanced & Expert Users Naming conventions for shared libraries in Linux Post 302259651 by Corona688 on Tuesday 18th of November 2008 03:33:14 PM
Old 11-18-2008
They are version numbers, and are there for two reasons; so that you can safely and easily upgrade your libraries, and so you can have more than one version of them installed at the same time.

When there's two numbers there's a major and a minor version. libncursesw.so.5.6 has major version 5 and minor version 6; in theory any minor version of the same major version is compatible without recompiling, so programs that linked to libncursesw.so.5 wouldn't miss a beat if you upgraded to 5.7 for a bugfix. If you had an ancient program demanding version 4, you could safely install a 4.x library alongside the 5.x ones, and nothing but that program would use it.

Sometimes programmers don't think that far ahead though; they might link to a too specific version, breaking their program every time you upgrade a library, or link to libncursesw.so itself, causing crashes and/or strange runtime errors when the library's not what they expected.
 

10 More Discussions You Might Find Interesting

1. Programming

Shared libraries

Hello everybody, I am having major problems at the moment with shared libraries and I have to little knowledge of them to solve them. So please, please help me :) Ok this is the problem: I have a library A, which uses B and C, and C uses again D. If I try to run A as plugin in apache,... (0 Replies)
Discussion started by: Micky
0 Replies

2. Programming

shared libraries

I am compiling code which produces .a and .la libraries. How can I produce .so libraries? I know that gcc -shared does but how? (2 Replies)
Discussion started by: thalex
2 Replies

3. Linux

Shared Libraries

How do i make a library shared say i have a library a.so which i have just compiled. I want to make it shared how do i make it Next Queation is what is the difference between a.so.0 a.so.1 a.so.2 & a.so :rolleyes: (1 Reply)
Discussion started by: wojtyla
1 Replies

4. Programming

how to view loaded shared libraries by running processes in linux

anybody knows how to view loaded shared libraries by running processes in linux enviornment? any command or tool ? thanks a lot (3 Replies)
Discussion started by: princelinux
3 Replies

5. UNIX Desktop Questions & Answers

Naming convention for Libraries..

Hi All, I need to know standard naming convention for Unix libraries (including all flavours of unix)..As I have gone through some sites and found out The UNIX convention for naming of libraries is lib<name>.so.<major>.<minor>.<revision> so is it statndard . also does it change... (0 Replies)
Discussion started by: rkshukla14
0 Replies

6. UNIX for Advanced & Expert Users

static and shared libraries

can someone explain whether my understanding is correct lets suppose we have a program that uses library x. if x is static then the code of x will be part of our program, so if we're going to have 5 executables of our program, then each executable will have x as part of it. Also, x does not... (2 Replies)
Discussion started by: JamesByars
2 Replies

7. Solaris

A query on Disk naming conventions in Solaris.

These are findings by me with my little experience with Solaris 10. Please correct me if wrong.. In x86 systems with ide hard disk: c= controller d=disk s=slice 1.Here controller c0 means the primary ide controller ide0. controller c1 means the secondary ide controller ide1. ... (5 Replies)
Discussion started by: saagar
5 Replies

8. Solaris

Iscsi shared disk - same naming across server

Hi all, Is there anyway i can control the naming of the disk device ? I have added an iscsi disk on server1 using iscsiadm , devfsadm and it is now showing as /dev/dsk/c2t0d0 in node1 However, i am worried that the same disk will appear as /dev/dsk/cXtXd0 in node2 This iscsi disk(lun)... (0 Replies)
Discussion started by: javanoob
0 Replies

9. Programming

C/C++ shared libraries on Linux.

This is the first time that I created a dynamic library in linux and although the program works, I do not get the correct information about the library when executing ldd. I explain the details: 1) Source code: bye_fn.c: #include <stdio.h> #include "hello.h" void bye (const char*... (9 Replies)
Discussion started by: jose_spain
9 Replies

10. Cybersecurity

Proper naming conventions

Hey guys, not sure should I post it here or in 'What is on Your Mind?' I'm discussing usage of DSL (domain specific language) in security tools with my colleagues. We haven't been able to reach an agreement over naming conventions. There are many tools using DSL: splunk, sumologic,... (2 Replies)
Discussion started by: Tobby P
2 Replies
XkbLibraryVersion(3)						   XKB FUNCTIONS					      XkbLibraryVersion(3)

NAME
XkbLibraryVersion - Determines the compatibility of a library at runtime. SYNOPSIS
Bool XkbLibraryVersion (int *lib_major_in_out, int *lib_minor_in_out); ARGUMENTS
lib_major_in_out Specifies and returns the major Xkb library version. lib_minor_in_out Specifies and returns the minor Xkb library version. DESCRIPTION
If an application is dynamically linked, both the X server and the client-side X library must contain the Xkb extension in order for the client to use the Xkb extension capabilities. Therefore a dynamically linked application must check both the library and the server for compatibility before using Xkb function calls. A properly written program must check for compatibility between the version of the Xkb library that is dynamically loaded and the one used when the application was built. It must then check the server version for compatibility with the version of Xkb in the library. If your application is statically linked, you must still check for server compatibility and may check library compatibility. (It is possi- ble to compile against one set of header files and link against a different, incompatible, version of the library, although this should not normally occur.) Pass the symbolic value XkbMajorVersion in lib_major_in_out and XkbMinorVersion in lib_minor_in_out. These arguments represent the version of the library used at compile time. The XkbLibraryVersion function backfills the major and minor version numbers of the library used at run time in lib_major_in_out and lib_minor_in_out. If the versions of the compile time and run time libraries are compatible, XkbLi- braryVersion returns True, otherwise, it returns False. In addition, in order to use the Xkb extension, you must ensure that the extension is present in the server and that the server supports the version of the extension expected by the client. Use XkbQueryExtension to do this, as described in the next section. RETURN VALUES
True The XkbLibraryVersion returns True if the versions of the compile time and run time libraries are compatible. False The XkbLibraryVersion returns False if the versions of the compile time and run time libraries are not compatible. SEE ALSO
XkbMajorVersion(3), XkbMinorVersion(3), XkbQueryExtension(3) X Version 11 libX11 1.3.2 XkbLibraryVersion(3)
All times are GMT -4. The time now is 02:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy