![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shared memory in shared library | DreamWarrior | High Level Programming | 12 | 05-30-2007 05:33 PM |
| UNIX patches with incompatible packages | duke0001 | UNIX for Advanced & Expert Users | 0 | 02-08-2007 11:40 AM |
| all about shared memory | vijaya2006 | Linux | 0 | 02-28-2006 04:14 AM |
| What is "incompatible protocol version" | yaoww | UNIX for Advanced & Expert Users | 1 | 09-25-2005 01:26 AM |
| rpc.rstatd: incompatible... | toto2000ff | UNIX for Advanced & Expert Users | 0 | 03-04-2005 02:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
-pg incompatible with -shared
while compiling my code with -pg option
i got the following error: ld (prelink): -pg incompatible with -shared; assuming -nopg any idea to overcome this problem? how can i use gprof profiler for a program using shared libraries? |
|
||||
|
The error message means what it says -- gprof won't work for shared libraries. It's not a bug, gprof's just not meant for it. You'll need to link it statically or use something else.
If you use Linux, you might find sysprof useful. It'd probably do better on shared libraries than executables since shared libraries by definition have symbol information... |
|
||||
|
One choice -
Don't compile a shared library - create an archive ie., library.a Then you can link against it for profiling. Note: monitor normally records time in and calls to library members when the library is compiled normally but the "local" code is compiled -pg Yours should do that, so it will show up in a profiler. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|