CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Feb 2005
    Location
    Denver
    Posts
    353

    Linker error with purify

    Are there any purify experts out there? I’m trying to run a newly installed version of purify on a Solaris 8 system and am having problems. I’ve tried to go to the IBM site to get help on this, but I’ve found absolutely nothing with any substance. Anyway, I thought I’d try here to see if someone could help me. Here’s the problem.

    I wrote a very simple little program with memory leaks to test purify and this is what happens.

    a. I can compile the program with a simple command as such.

    CC –o main main.C
    b. I can also compile the program with the debug flag as such.
    CC –g –o main main.C

    Both a and b work just fine. But when I try to use purify, this is what happens.

    c. I can compile the program with purify as such.
    purify CC –o main main.C
    d. I cannot compile the program in debug mode with purify as such.
    purify CC –g –o main main.C

    When I try I get the following linker error…
    Undefined symbol

    int std::char_traits<char>::eof()

    c works just fine with purify. The problem is since c wasn’t compiled in debug mode, you cannot check for memory leaks while the process is active, and more importantly, you cannot see the lines where the memory leaks occur (or at least the place where the leaked memory was allocated). In order to do this, you need to compile the code in debug mode.

    Does anyone have any ideas why I’m getting the undefined symbol only when I use purify?

    Thanks for any help that can be provided.

    Note: I've also tried doing this in separate compiling and linking steps with the exact same results.
    Last edited by sszd; October 1st, 2010 at 08:47 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured