Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

how to install the code in os x? #32

Open
shuyaoyimei opened this issue Apr 27, 2018 · 5 comments
Open

how to install the code in os x? #32

shuyaoyimei opened this issue Apr 27, 2018 · 5 comments

Comments

@shuyaoyimei
Copy link

hello
i have install it in /usr/local/include, but i can not find the bf.h, i am sure the include path is correct, could you give me some help.
thanks!

@mavam
Copy link
Owner

mavam commented Apr 27, 2018

Try including bf/bf.h. The installation creates an extra directory.

@shuyaoyimei
Copy link
Author

thanks,mavam
i have try it, but it do not work. i also try command "find / -name bf.h" and get nothing.
could you share more detail in the install progress?

@mavam
Copy link
Owner

mavam commented Apr 27, 2018

My bad, try including bf/all.hpp, that's the default include for the entire library.

@shuyaoyimei
Copy link
Author

hello,amvam
i get the error when i execute clang++ -std=c++11 -o out/TestBf testbf.cpp -v

Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
"/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name testbf.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 351.8 -v -dwarf-column-info -debugger-tuning=lldb -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/9.1.0 -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/nino/Downloads/RTree-master -ferror-limit 19 -fmessage-length 204 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.13.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/51/gf7zs5q55kx8015hspd22hc40000gn/T/testbf-98f318.o -x c++ testbf.cpp
clang -cc1 version 9.1.0 (clang-902.0.39.1) default target x86_64-apple-darwin17.5.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
/Library/Developer/CommandLineTools/usr/include/c++/v1
/usr/local/include
/Library/Developer/CommandLineTools/usr/lib/clang/9.1.0/include
/Library/Developer/CommandLineTools/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -no_deduplicate -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o out/TestBf /var/folders/51/gf7zs5q55kx8015hspd22hc40000gn/T/testbf-98f318.o -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
"bf::basic_bloom_filter::clear()", referenced from:
_main in testbf-98f318.o
"bf::basic_bloom_filter::basic_bloom_filter(double, unsigned long, unsigned long, bool, bool)", referenced from:
_main in testbf-98f318.o
"vtable for bf::basic_bloom_filter", referenced from:
bf::basic_bloom_filter::~basic_bloom_filter() in testbf-98f318.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

my os is os x 10.13.4, i have google the error and i try the all possible methods but not work.

i am so sorry to bother you, thanks.

@mavam
Copy link
Owner

mavam commented Apr 30, 2018

Looks like linking fails because -lbf is missing on the command line. If adding -lbf doesn't do the trick, try adding -L/path/to/libbf-shared-lib.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants