c - debugging linker errors (undefined symbols) -



c - debugging linker errors (undefined symbols) -

i'm trying link executable external library called libr. i'm not looking help library specifically, linker error, pasted below:

undefined reference `r_asm_new()'

ok, double check link command:

-lr_core -lr_config -lr_cons -lr_cmd -lr_util -lr_flags -lr_asm -lr_lib -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_sign -lr_diff -lr_socket -lr_fs -lr_magic -lr_db

and seems contain libraries libr bundle has. double the libr_asm.so file objdump:

$ objdump -t libr_asm.so.0.9.3git | grep r_asm_new 00000000000ca66a g df .text 0000000000000149 base of operations r_asm_new

so far can tell -l_asm flag should have done it. i'm linking c library c++ executable, can't think of how alter situation.

thanks.

edit: total link line:

/usr/bin/c++ cmakefiles/main.dir/main.cc.o cmakefiles/main.dir/elffile.cc.o cmakefiles/main.dir/elffilesection.cc.o cmakefiles/main.dir/elffiledefinitions.cc.o cmakefiles/main.dir/sectionswindow.cc.o cmakefiles/main.dir/sectionview.cc.o -o main -rdynamic -l/home/chris/radare_install/lib -lboost_filesystem-mt -lboost_system-mt -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lgtk-3 -lglibmm-2.4 -lcairomm-1.0 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lgtksourceviewmm-3.0 -lgtkmm-3.0 -lgtksourceview-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lr_core -lr_config -lr_cons -lr_cmd -lr_util -lr_flags -lr_lib -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_sign -lr_diff -lr_socket -lr_fs -lr_magic -lr_db -lr_asm -wl,-rpath,/home/chris/radare_install/lib

....the comments on question reminded me:

extern "c" { #include "foo.h" }

c

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -