Memory fault when i am using a shared object



Hi

I am new to Linux. I am facing on problem regarding shared object in
Linux. When I am running the application using the library the
application is crashing. It is showing a memory fault that is also just
before return statement. Is there any switch I have to use while
compiling.

Following are the steps I followed for compiling object files:

g++ -w -fPIC -g -o ./CPEPoints.o -c ./CPEPoints.cpp
g++ -w -fPIC -g -o ./CPERates.o -c ./ CPERates.cpp

Creating the Library.

g++ -g -shared -o ../../Lib/libCPERateCard.so.1


Using the Library with another application.

g++ RateCardTest.o -L./ -o RateCard -ldl Lib/libCPERateCard.so.1

Can anybody suggest what I am missing.

Thanks
Vinu

.



Relevant Pages

  • [9fans] quick question on threads on p9p
    ... /lib/i686/libm.so.6: linux 386 shared object /lib/libutil.so.1: linux 386 shared object /lib/i686/libc.so.6: linux 386 shared object /lib/ld-linux.so.2: linux 386 shared object /usr/local/plan9/acid/port /usr/local/plan9/acid/thread /usr/local/plan9/acid/386 acid; ... I'm seeing a bit more entries in /proc than I see in the threadsdisplay in acid. ...
    (comp.os.plan9)
  • Re: program compiled on Linux
    ... There is a 1:1 relationship between a .o file and a source file. ... This executable may then requite "shared object" files to actually run. ... The latter are the Linux equivalent of DLLs. ...
    (comp.os.linux.development.system)
  • Re: Profiling of shared libraries
    ... Defines a shared object to be profiled by the runtime ... When profiling is enabled, a profiling buffer file ... This may be available on Linux as well. ... linker implementations are generally similar to Solaris. ...
    (comp.unix.programmer)
  • Wrapping shared object functions?
    ... I'm developing a shared object for linux, which is to wrap some functions ... I'm aware of the solution to make my object load it dynamicly, ...
    (comp.os.linux.development.apps)