View Full Version : binreloc with c++

04-05-2005, 01:56 AM
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???

04-10-2005, 07:32 AM
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... :)