Skip to main content

Problem

  • Product Name: VisiBroker for C
  • Product Version: 5.2 and above
  • Product component : Compiler/Linker
  • Platform/ OS version: All

This article guides on how to find out which VisiBroker ORB libraries are required to compile and link your application. It is important for the following reasons:

1. If you do not include all the necessary ORB libraries, you may be unable to start your application or cause your application to crash unexpectedly.

For example the same Server application may start well on Solaris 10 but it may fail to start on Solaris 9 giving following error message:

"pthread_create: No such file or directory" happens at the following line:

CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");

2. It helps to maintain the size of the application. You are advised to include the libraries needed by your application only. You do not need to include all VisiBroker libraries as static libraries. (E.g. libcosnotify_p.a, libtelcolog_p.a, libcostm_p.a on HP-UX).

Resolution

A. You can look through our shipped copy of stdmk file in the VisiBroker installation. (It can be found in /examples/vbe directory for VisiBroker 6.5 & below or /examples/vbroker directory in VisiBroker 7.0 & above) to find out which VisiBroker libraries are necessary for your application. In the stdmk file, it has comments which mention the usage for the libraries. You can decide to include the selected VisiBroker libraries based on the nature of your applications.

You can invoke the ldd command to check the static linking of the libraries for your application. It is helpful if:

a. you are using a different version of OS that is not listed in the Platform Support Matrix for the particular Visibroker version. Different OS have different requirements, the shipped stdmk file is always tested on the Supported platform only.

b. you are already following our stdmk options shipped in the example directory but still are not sure whether you have used the correct library linking options. For example:

In the case of error message - "pthread_create: No such file or directory", ldd output would reveal that the application did not have the requisite thread library (libthread.so.1) link, therefore the pthread_create symbol is not found. It will point us to the most probable causes. Eg. You may have missed out either the option "-mt" for multi-threading and/or "-lpthread" for linking POSIX threads library or any of these option flags were placed wrongly rendering them ineffective.

B. Alternatively, you can search our VisiBroker examples in the /examples/vbe directory which match the nature of one's application. Each of the example folder will have a Makefile_cpp file, which provides the information on which libraries are needed for such applications. You may first try running a relevant example. It will help in verifying that the environment settings are correct.


#Libraries
#stdmk
#Security
#VisiBroker