Sponsored Content
Full Discussion: shared library not found
Top Forums Programming shared library not found Post 302154191 by JCR on Friday 28th of December 2007 10:01:12 AM
Old 12-28-2007
$(TARGET_APP) : main.o
$(CPP) $(FASTCGI_LIB) -L /usr/local/lib/ -lsqlite3 -o $(TARGET_APP) main.o
doe compile indeed ( I just took off the -L before $(FASTCGI_LIB) but I am back to my previous problem since the final executable returns:
symbol lookup error: ./app: undefined symbol: sqlite3_open_v2

Since the program compiles, the sqlite_open_v2 is found in both the header and the shared library but for some reason, at run-time, it fails.
 

10 More Discussions You Might Find Interesting

1. Programming

Shared Library

hello all I want to work in shared libraries how can i work in Linux Environment ? (2 Replies)
Discussion started by: rajashekaran
2 Replies

2. SCO

Creation of Shared library

Hi all, I am new to sco unix. I would like to know abt the procedure to create shared library in Sco-unix. Is it differ from linux? any help?? Thanx in Advance!!!!! (0 Replies)
Discussion started by: sarangb
0 Replies

3. UNIX for Advanced & Expert Users

shared library

What is the primary difference between static library and dynamic library? and how to write static shared library? (1 Reply)
Discussion started by: areef4u
1 Replies

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

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

6. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies

7. Programming

Makefile shared library g++

I'm having trouble with my makefile, I'm trying to code a shared library to be used by another program *EDIT* Found the solution: CC = g++ MODULES= readconfig.o ReadConfigLib.o OBJECTS= RCLOBJECTS= ReadConfigLib.cpp readconfig.cpp configDefinitions.h readconfig.h ReadConfigLib.h... (0 Replies)
Discussion started by: james2432
0 Replies

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

9. AIX

Add shared members from library to same library in a different directory

I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message. add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Discussion started by: kneemoe
5 Replies

10. Linux

Shared-library error

Hi All, i am facing shared library error, below is the output of the command I am executing on my client # /usr/software/bin/sudo /usr/software/bin/sudo: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such file or directory # I tried install... (4 Replies)
Discussion started by: muzaffar.k
4 Replies
LD(1)							      General Commands Manual							     LD(1)

NAME
ld - loader SYNOPSIS
ld [ option ] file ... DESCRIPTION
Ld combines several object programs into one, resolves external references, and searches libraries. In the simplest case several object files are given, and ld combines them, producing an object module which can be either executed or become the input for a further ld run. (In the latter case, the -r option must be given to preserve the relocation bits.) The output of ld is left on a.out. This file is made executable only if no errors occurred during the load. The argument routines are concatenated in the order specified. The entry point of the output is the beginning of the first routine. If any argument is a library, it is searched exactly once at the point it is encountered in the argument list. Only those routines defin- ing an unresolved external reference are loaded. If a routine from a library references another routine in the library, and the library has not been processed by ranlib(1), the referenced routine must appear after the referencing routine in the library. Thus the order of programs within libraries may be important. If the first member of a library is named `__.SYMDEF', then it is understood to be a dictio- nary for the library such as produced by ranlib; the dictionary is searched iteratively to satisfy as many references as possible. The symbols `_etext', `_edata' and `_end' (`etext', `edata' and `end' in C) are reserved, and if referred to, are set to the first location above the program, the first location above initialized data, and the first location above all data respectively. It is erroneous to define these symbols. Ld understands several options. Except for -l, they should appear before the file names. -s `Strip' the output, that is, remove the symbol table and relocation bits to save space (but impair the usefulness of the debugger). This information can also be removed by strip(1). -u Take the following argument as a symbol and enter it as undefined in the symbol table. This is useful for loading wholly from a library, since initially the symbol table is empty and an unresolved reference is needed to force the loading of the first routine. -lx This option is an abbreviation for the library name `/lib/libx.a', where x is a string. If that does not exist, ld tries `/usr/lib/libx.a'. A library is searched when its name is encountered, so the placement of a -l is significant. -x Do not preserve local (non-.globl) symbols in the output symbol table; only enter external symbols. This option saves some space in the output file. -X Save local symbols except for those whose names begin with `L'. This option is used by cc(1) to discard internally generated labels while retaining symbols local to routines. -r Generate relocation bits in the output file so that it can be the subject of another ld run. This flag also prevents final defini- tions from being given to common symbols, and suppresses the `undefined symbol' diagnostics. -d Force definition of common storage even if the -r flag is present. -n Arrange that when the output file is executed, the text portion will be read-only and shared among all users executing the file. This involves moving the data areas up to the first possible 4K word boundary following the end of the text. -i When the output file is executed, the program text and data areas will live in separate address spaces. The only difference between this option and -n is that here the data starts at location 0. -o The name argument after -o is used as the name of the ld output file, instead of a.out. -e The following argument is taken to be the name of the entry point of the loaded program; location 0 is the default. -O This is an overlay file, only the text segment will be replaced by exec(2). Shared data must have the same layout as in the program overlaid. -D The next argument is a decimal number that sets the size of the data segment. FILES
/lib/lib*.a libraries /usr/lib/lib*.a more libraries a.out output file SEE ALSO
as(1), ar(1), cc(1), ranlib(1) BUGS
LD(1)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy