Building a C HelloWorld.so (shared object) below with a C++ myatomic library Boost header
myatomic.cpp
...
#include <boost/system/error_code.hpp>
...
Loading HelloWorld.so with dlopen() returns error: _ZTVN10__cxxabiv117__class_type_infoE
If that Boost header is commented-out, then dlopen() succeeds?
HelloWorld.yaml
...    
Common:
  Sources:
    - Folder: src
      Files:
        - HelloWorld.h
        - HelloWorld.c
  ConanLibs:
     - CONAN_PKG::myatomic
Linux:
  CompilerOptions:
    - -fPIC
    - -fmax-errors=50
    - -Wno-main
    - -Wno-unused-variable
    - -Wno-pointer-to-int-cast
    - -Wno-implicit-function-declaration
    - -Wno-int-conversion
  LinkerOptions:
    - -ldl
    - -lpthread
    - -lrt
    - -lstdc++
  
Does Boost C++ under linux need to built with specific options? Maybe gcc vs g++ issues?
Added -lstdc++ to HelloWorld linker options but to no avail. :(
Aucun commentaire:
Enregistrer un commentaire