Category : dynamic-linking

Currently, I am using the Ubuntu version of Linux and trying to build a project that uses the ZMQ library. I would like to implement cppzmq/libzmq to do this. For reference, here is how I installed both libzmq and cpp zmq (did both in the home directory): Install libzmq git clone https://github.com/zeromq/libzmq.git sudo apt-get update ..

Read more

Can I have some assistance configuring Visual Code (not Visual Studio) to build a C++ library? Both static and most importantly a dynamic library? Visual Code requires that you create a tasks.json file to tell VS Code how to build (compile) the program. This task will invoke the Microsoft C++ compiler to create an executable ..

Read more

I’m trying to use Linux TTY Driver Ver 1.0.15.0 of this product. I did all the steps in README_Ubuntu, copying header files in my project dir. However, it failes to compile, complaining that /tmp/ccH3NfSt.o: In function `main’: main.cpp:(.text+0x5): undefined reference to `dp_lib_init()’ collect2: error: ld returned 1 exit status To compile my main.cpp, I used ..

Read more

During execution of thread sanitizer test, I’ve noticed something that worries me a little (maybe more from lack of understanding). The part of the call stack below represents a data race detected by thread sanitizer: Previous write of size 8 at 0x7b4400020080 by thread T4 (mutexes: write M258529629327854840): #0 malloc <null> (libtsan.so.0+0x2cbe2) … #11 std::thread::_Invoker<std::tuple<void ..

Read more

I have the following source code: foo.h void foo(); foo.cpp #include "foo.h" #include <iostream> void foo(){ std::cout << "This is foo" << std::endl; } main.cpp: #include "foo.h" int main(){ foo(); return 0; } Then I run the following command to produce both static and shared versions of foo.cpp: g++ -c -fPIC foo.cpp ar rvs libfoo.a ..

Read more