Thread: binreloc with c++

  1. #1
    Registered User gandalf_bar's Avatar
    Join Date
    Oct 2003

    binreloc with c++

    Hi, there is a binreloc.....

    With this binreloc, you can get the full path of you application. I can compile a simple c program with this binreloc just like in example in that website....

    However I failed to compile a c++ program with this binreloc. This is the error:
    prefix.cpp:59: error: invalid conversion from `void*' to `char*(*)(void*, void*)'

    Any idea???
    A man asked, "Who are you?"
    Buddha answered, "I am awaked."

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    First, it should be "prefic.c" - because it it C code, not C++.

    Also, there was a check-in in CVS 4 days ago to fix that error.

    Just change line 59 to:
    >> static br_locate_fallback_func fallback_func = (br_locate_fallback_func) NULL;

    For those of you who are curious as to how this package works, here's a code excerpt that will explain it.
        f = fopen ("/proc/self/maps", "r");

    I meant "prefix.c" of course...
    Last edited by Codeplug; 04-10-2005 at 07:48 AM.

Popular pages Recent additions subscribe to a feed