-
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???
-
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]