You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**$ g++ -I /usr/local/restclient-cpp/include -l restclient-cpp -std=c++11 main.cpp -o main** ld: library not found for -lrestclient-cpp clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am trying to build a simple project with this library and so far no success yet. I think i am doing something.
I built the library with prefix set to --prefix=/usr/local/restclient-cpp.
I copied the sample code from the repo and tried to compile it with the flags below.
g++ -I /usr/local/restclient-cpp/include -std=c++11 main.cpp -o main -v
Below is the output.
`Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 264.3.102 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0 -I /usr/local/restclient-cpp/include -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/joefazee/Desktop/curl-test -ferror-limit 19 -fmessage-length 203 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/s9/w9447kdn4pd5b44ldn7xmxm80000gp/T/main-8a7637.o -x c++ main.cpp
clang -cc1 version 7.3.0 (clang-703.0.31) default target x86_64-apple-darwin15.4.0
ignoring nonexistent directory "/usr/include/c++/v1"
include "..." search starts here:
include <...> search starts here:
/usr/local/restclient-cpp/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.11.0 -o main /var/folders/s9/w9447kdn4pd5b44ldn7xmxm80000gp/T/main-8a7637.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
"RestClient::del(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
_main in main-8a7637.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)`
The text was updated successfully, but these errors were encountered: