Sponsored Content
Full Discussion: Shared Object Question
Top Forums Programming Shared Object Question Post 302501048 by dorik on Wednesday 2nd of March 2011 10:30:05 AM
Old 03-02-2011
Quote:
That's weird. Perhaps your header is actually defining some things in the class, not just declaring them?
Nope, just a class declaration. When I had it working by including the definitions in the project and the library, I set the static variable in the project and didn't set it in the library. The former had an an address and the latter was NULL.

Instead of including the definitions in both, I'd like to try the other approach I mentioned (exporting dynamic symbols in the project). This time, however, the library isn't even loading because of unresolved definitions. I used nm on the main executable and the unresolved symbols (from the library) mentioned in the error message are in there.
 

10 More Discussions You Might Find Interesting

1. Programming

Does my ld support shared object creation

Hi, I have been trying to create a sharef object on my HP UX 11 machine (HP-UX <myhostname> B.11.00 A 9000/879 ...... two-user license) to create the shared object first I am creating the object file using cc -Aa -c +z dyn.c (I use -Aa and +z as per HP's manual on linkers ) to create the... (0 Replies)
Discussion started by: linuxpenguin
0 Replies

2. Linux

Shared Object File

Hi All, I created the share object file using gcc -shared -fpic mypp.cpp -o myp.so but, pls tell me how to link this .so file to my client program. Thanks (0 Replies)
Discussion started by: sarwan
0 Replies

3. AIX

Shared Object library problem

Hi, When using shared objects on AIX 4.3 i am getting runtime problems. I have a small sample program which links to a shared object libray, oracle and system related libraries. At runtime it fails (gives segmentation fault and coredump ) in one proc file when executing login statement. But... (0 Replies)
Discussion started by: suman_jakkula
0 Replies

4. Programming

calling a shared object from a daemon

Hi I have a multithreaded daemon(server) which will accept connections from various clients and sends back results to them. In order to serve my daemon clients, it has to establish a TCP connection to another server(vendor supplied which is listening on a specific TCP port) and gets the... (11 Replies)
Discussion started by: axes
11 Replies

5. UNIX for Advanced & Expert Users

Issue with shared object in AIX

Hi All, I have a problem with the shared objects setup in AIX. We have a customized shell written by the developers over here. When i issue a MQ Series command (mqsilist) it is giving the error as . All the commands making use of this libImbCmdLib.a.so is failing. But when executed in normal... (1 Reply)
Discussion started by: dhanamurthy
1 Replies

6. Shell Programming and Scripting

Any way to access shared object using shell

Hi, I have created a shared object (abc.so) which has a function sum(int a, int b). Is there any way to load the "abc.so" and use the sum function using shell script.. thanks in advance (2 Replies)
Discussion started by: yhacks
2 Replies

7. AIX

AIX 5.2 C++ shared object issue

Hi all, I am developing an application with two components. One "c" binary and one "C++" shared object. While execution, the shared object crashes out and core dump is created whenever "new" is executed. But if i use malloc this will work perfectly. I tried to use dbx. Below given was... (1 Reply)
Discussion started by: itssujith
1 Replies

8. Programming

Error while running shared object

Hello, While running a c++ shared object on AIX I am facing below error - rtld: 0712-001 Symbol __ct__3ETDFv was referenced from module /bancs/aml/lib/libmonitor.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol etd_insert__3ETDFv was... (3 Replies)
Discussion started by: yatrik007
3 Replies

9. Red Hat

shared object

Hi, I would like to create a shared object ( .so). This shared object 1. uses the functions from a library. 2. Also it should be able to use the global variable in an app To achieve this what should I do ? 1) To use the functions in the library should I give the -ld option while... (1 Reply)
Discussion started by: rvan
1 Replies

10. Programming

Help building and using a shared object (x64)

Hello, I am not that experienced with Linux, and I am currently facing some issues. The application I'm working on uses hundreds of threads. To optimize the memory usage, I am putting all my data inside a shared object (so). The steps for this are as follows: 1. a C file (generated... (17 Replies)
Discussion started by: Maelstrom
17 Replies
fastbind(1)						      General Commands Manual						       fastbind(1)

NAME
fastbind - Prepare an incomplete executable for faster program start-up SYNOPSIS
incomplete-executable... DESCRIPTION
is a tool that can improve the start-up time of programs that use shared libraries (incomplete executables) by storing information about needed shared library symbols in the executable file. performs analysis on the symbols used to bind an executable and all of it's dependent shared libraries, and stores this information in the executable file. The next time the executable is run, the dynamic loader will notice that this information is available, and it will use this fastbind information to bind the executable instead of the standard search method for binding the symbols. For Itanium-based systems, the dynamic loader is for 32-bit mode or for 64-bit mode. For PA-RISC systems, the dynamic loader is for 32-bit mode or for 64-bit mode. Since writes the fastbind information in the executable file, you must have write permission on the executable file. Also, if the exe- cutable file being analyzed is being run as another process, the file will be locked against modifications by the kernel, and will fail. If the shared libraries that an executable is dependent on are modified after the fastbind information is created, the dynamic loader will silently revert to standard search method for binding the symbols. The fastbind information can be re-created by running on the executable again. will automatically erase the old fastbind information and generate the new one. The option can be used to instruct the linker to run the fastbind tool on an incomplete executable it has produced. Environment Variables If determines that the fastbind information is out of date, it will silently revert to standard search method for binding the symbols. If the environment variable is set to the dynamic loader will emit a warning message when the fastbind information is out of date. The environment variable can be set to to make the dynamic loader ignore the fastbind information and revert to the standard search method for binding the symbols. Options recognizes the following options: Remove the fastbind information from the executable, returning it to the same state it was in before was originally run on it. Normally, if detects any unsatisfied symbols while building the fastbind information, it will generate an error message and not mod- ify the executable file. When is invoked with option however, unresolved symbols are allowed. EXTERNAL INFLUENCES
Environment Variables The following internationalization variables affect the execution of Determines the locale category for native language, local customs and coded character set in the absence of and other environment variables. If is not specified or is set to the empty string, a default of (see lang(5)) is used instead of Determines the values for all locale categories and has precedence over and other environment variables. Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error. Determines the locale category for numeric formatting. Determines the locale category for character handling functions. Determines the location of message catalogs for the processing of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to See envi- ron(5). In addition, the following environment variable affects Specifies a directory for temporary files (see tmpnam(3S)). DIAGNOSTICS
returns zero when the operation is successful. A non-zero return code indicates that an error occurred. EXAMPLES
To run on the executable file enter: To later remove the fastbind information from the executable file enter: WARNINGS
32-bit PA-RISC does not work with EXEC_MAGIC executables. effectively enforces bind restricted and bind immediate. For example, consider an executable linked bind deferred, which calls a function foo() defined in an implicitly loaded library. Before the actual call is made, if it explicitly loads a shared library (using shl_load(3X) with having a definition for when is finally called, it will be resolved from the explicitly loaded library. But after running the symbol will be resolved from the implicitly loaded library. AUTHOR
was developed by Hewlett-Packard. FILES
output file 32-bit PA-RISC dynamic loader 32-bit Itanium-based dynamic loader 64-bit PA-RISC dynamic loader 64-bit Itanium-based dynamic loader message catalog temporary files SEE ALSO
System Tools ld(1) invoke the link editor Miscellaneous a.out(4) assembler, compiler, and linker output dld.sl(5) PA-RISC dynamic loader dld.so(5) Itanium-based dynamic loader Texts and Tutorials
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy