Git Product home page Git Product logo

dmbcs-kraken-api's People

Contributors

dale-m avatar

Watchers

 avatar  avatar

Forkers

tweakoz

dmbcs-kraken-api's Issues

3 Use example - Error

I followed the documentations to compile and install, now i'm trying the sample "3 Use example", when i compile the sample i get the error:

$ g++ -std=c++17 $( pkg-config --cflags --libs dmbcs-kraken-api) a.cc -o kraken-api /usr/bin/ld: /tmp/ccxTv4S5.o: in "main" function: a.cc:(.text+0x11b): undefined reference to "DMBCS::Kraken_API::ticker_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)" collect2: error: ld returned 1 exit status

how can i solve this ?

Linker error

I am trying to work with this library and followed the instructions. The library was build and installed without errors:

~$ sudo ldconfig -v -n /usr/local/lib
/usr/local/lib:
        libdmbcs-kraken-api.so.0 -> libdmbcs-kraken-api.so.0.0.0
~$ ls -l /usr/local/lib
total 3516
-rw-r--r-- 1 root root  2460006 May 16 20:02 libdmbcs-kraken-api.a
-rwxr-xr-x 1 root root     1015 May 16 20:02 libdmbcs-kraken-api.la
lrwxrwxrwx 1 root root       28 May 16 20:02 libdmbcs-kraken-api.so -> libdmbcs-kraken-api.so.0.0.0
lrwxrwxrwx 1 root root       28 May 16 20:02 libdmbcs-kraken-api.so.0 -> libdmbcs-kraken-api.so.0.0.0
-rwxr-xr-x 1 root root  1120800 May 16 20:02 libdmbcs-kraken-api.so.0.0.0
drwxr-xr-x 2 root root     4096 May 16 20:02 pkgconfig

However, when trying to compile the example code I am getting a linker error which I do not understand:

~$ g++ -std=c++17 $( pkg-config --cflags --libs dmbcs-kraken-api) autocoin.cpp -o kraken-api -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
COLLECT_GCC_OPTIONS='-std=c++1z' '-I' '/usr/local/include' '-I' 'include' '-I' '/usr/include/x86_64-linux-gnu' '-I' 'include' '-I' '/usr/include/x86_64-linux-gnu' '-L/usr/local/lib' '-Llib/x86_64-linux-gnu' '-o' 'kraken-api' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/7/cc1plus -quiet -v -I /usr/local/include -I include -I /usr/include/x86_64-linux-gnu -I include -I /usr/include/x86_64-linux-gnu -imultiarch x86_64-linux-gnu -D_GNU_SOURCE autocoin.cpp -quiet -dumpbase autocoin.cpp -mtune=generic -march=x86-64 -auxbase autocoin -std=c++1z -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccdjzBpT.s
GNU C++14 (Ubuntu 7.5.0-3ubuntu1~18.04) version 7.5.0 (x86_64-linux-gnu)
        compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/7"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/7/../../../../x86_64-linux-gnu/include"
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring nonexistent directory "include"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
  as it is a non-system directory that duplicates a system directory
ignoring nonexistent directory "include"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/7
 /usr/include/x86_64-linux-gnu/c++/7
 /usr/include/c++/7/backward
 /usr/lib/gcc/x86_64-linux-gnu/7/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++14 (Ubuntu 7.5.0-3ubuntu1~18.04) version 7.5.0 (x86_64-linux-gnu)
        compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3eb3dc290cd5714c3e1c3ae751116f07
COLLECT_GCC_OPTIONS='-std=c++1z' '-I' '/usr/local/include' '-I' 'include' '-I' '/usr/include/x86_64-linux-gnu' '-I' 'include' '-I' '/usr/include/x86_64-linux-gnu' '-L/usr/local/lib' '-Llib/x86_64-linux-gnu' '-o' 'kraken-api' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v -I /usr/local/include -I include -I /usr/include/x86_64-linux-gnu -I include -I /usr/include/x86_64-linux-gnu --64 -o /tmp/cc6WHylX.o /tmp/ccdjzBpT.s
GNU assembler version 2.30 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.30
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/:/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/7/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-std=c++1z' '-I' '/usr/local/include' '-I' 'include' '-I' '/usr/include/x86_64-linux-gnu' '-I' 'include' '-I' '/usr/include/x86_64-linux-gnu' '-L/usr/local/lib' '-Llib/x86_64-linux-gnu' '-o' 'kraken-api' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/7/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/7/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper -plugin-opt=-fresolution=/tmp/ccy9hVj1.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o kraken-api /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o -L/usr/local/lib -Llib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -ldmbcs-kraken-api -lcurlpp -Bsymbolic-functions -z relro -lcurl -lssl -lcrypto -lcurlpp -Bsymbolic-functions -z relro -lcurl -lssl -lcrypto /tmp/cc6WHylX.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crtn.o
/tmp/cc6WHylX.o: In function `main':
autocoin.cpp:(.text+0x117): undefined reference to `DMBCS::Kraken_API::ticker_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status

The library is existing and I would expect another error if the file could not be found. The library code shows that DMBCS::Kraken_API::ticker_info() exists so I don't understand why the reference should be undefined.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.