Thread: binreloc with c++

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

    binreloc with c++

    Hi, there is a binreloc.....
    http://autopackage.org/docs/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
    Posts
    4,981
    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.
    http://cvs.sunsite.dk/viewcvs.cgi/au...reloc/#dirlist

    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.
    Code:
        f = fopen ("/proc/self/maps", "r");
    gg

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

Popular pages Recent additions subscribe to a feed