Sponsored Content
Full Discussion: Creating a shared Libary ?
Top Forums Programming Creating a shared Libary ? Post 78083 by Lazzar on Friday 15th of July 2005 10:12:53 AM
Old 07-15-2005
Question Creating a shared Libary ?

hi,
I am trying to build a shared libary to overwrite some standard c functions (malloc etc), now i get the following error:

my system is AIX 5.2

Code:
gcc -fPIC -g -c -Wall mycfile.c

so far so good .o file created--> mycfile.o
now building the .a or .so libary (.a or .so ?? i am not sure which file type ist has to be)
Code:
gcc -shared -WI,-soname,libmystuff.so.1 -o libmystuff.so.1.0.1 mycfile.o -lc -ldl
ld: 0706-005 Cannot find or open file: libmystuff.so.1
        ld:open(): A file or directory in the path name does not exist.
collect2: ld returned 255 exit status

Why is he trying to open libmystuff.so.1 ?? he should create it!

what am i doing wrong?

Lazzar
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shared Objects

Hi Friends ! I have a library, say libxyz.a. To view all the object files in the archive, i issued the command : ar -t libxyz.a which displayed all the object files it contains. Now, I would like to know the functions in each object file. Is there any such command that displays... (3 Replies)
Discussion started by: mrgubbala
3 Replies

2. 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

3. Linux

load error while creating shared library

Hi, I am trying to create shared library. When i run the script to build the library i get these errors ld: warning: option -o appears more than once, first setting taken ld: fatal: file libgc.so.0: open failed: No such file or directory ld: fatal: File processing errors. No output written... (0 Replies)
Discussion started by: masg1
0 Replies

4. AIX

Creating a shared filesystem

Hi everybody, Is it possible to create a Shared Filesystem on Network to be accessed from 2 Systems? Both systems are AIX but with different versions. One of these systems is AIX 4.3 & the other is AIX 5.2. Thanks in advanced (8 Replies)
Discussion started by: aldowsary
8 Replies

5. Programming

Shared memory in shared library

I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)
Discussion started by: DreamWarrior
12 Replies

6. Programming

Shared memory for shared library

I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability. Obviously, I'll have to worry about mutual exclusion. (0 Replies)
Discussion started by: otheus
0 Replies

7. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

8. AIX

Shared FS

I am working on project that need shared access to the FS from 2 AIX HACMP nodes. This FS is created on a SAN disk and the VG that includes this FS is active on node A. What options do I have so that this FS can also be accessed from Node B ? We don't have GPFS, so that is not a option.... (3 Replies)
Discussion started by: mk8570
3 Replies

9. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies

10. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies
libumem(3LIB)                                                   Interface Libraries                                                  libumem(3LIB)

NAME
libumem - object-caching memory allocation library SYNOPSIS
cc [ flag... ] file... -lumem [ library... ] #include <umem.h> DESCRIPTION
Functions in this library provide fast, scalable object-caching memory allocation with multithreaded application support. In addition to the standard malloc(3C) family of functions and the more flexible umem_alloc(3MALLOC) family, libumem provides powerful object-caching ser- vices as described in umem_cache_create(3MALLOC). The libumem library also provides extensive debugging support, including detection of memory leaks, buffer overruns, multiple frees, use of uninitialized data, use of freed data, and many other common programming errors. See umem_debug(3MALLOC). INTERFACES
The shared object libumem.so.1 provides the public interfaces defined below. See intro(3) for additional information on shared object interfaces. calloc free malloc memalign realloc umem_alloc umem_cache_alloc umem_cache_create umem_cache_destroy umem_cache_free umem_free umem_nofail_callback umem_zalloc valloc FILES
/usr/lib/libumem.so.1 shared object /usr/lib/64/libumem.so.1 64-bit shared object ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsl (32-bit) | +-----------------------------+-----------------------------+ | |SUNWcslx (64-bit) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
intro(3), malloc(3C), umem_alloc(3MALLOC), umem_cache_create(3MALLOC), umem_debug(3MALLOC), attributes(5) SunOS 5.10 22 May 2003 libumem(3LIB)
All times are GMT -4. The time now is 10:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy