On Mon, Jun 17, 2013 at 6:30 PM, Adam Pridgen <
[email protected]> wrote:

> Hello,
>
> I have been trying to use libr from C++, but I am having trouble linking
> my program with libr_bin.so.  I have installed libr, r2-bindings, and
> radare2 from source in the /usr/ directory.
>
> Here is the compiler command that I am using:
>
> g++ -Wall -g  -I/usr/include/libr/  -L/usr/lib/ -o load_bin_file.o -lr_bin
>  load_bin_file.cpp
>
> and here is the basic program I am using:
>
> > === load_bin_file.cpp
>
> #include <string>
> #include <r_bin.h>
>
>
> int main(){
>     std::string file = "a_file.exe";
>     RBin *test = r_bin_new();
>     r_bin_load (test, file.c_str(), R_FALSE);
>
> }
>
> > ===
>
>
> I am coming up short on reasons why the compilation is failing.  Any help
> would be greatly appreciated.  Thanks,
>
> -- Adam
>


Forgot to include the compiler messages:

/tmp/ccGyU5BN.o: In function `main':
/===/load_bin_file.cpp:9: undefined reference to `r_bin_new()'
/===/load_bin_file.cpp:10: undefined reference to `r_bin_load(r_bin_t*,
char const*, int)'
collect2: error: ld returned 1 exit status
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to