小编Esm*_*ero的帖子

How to create a shared c library from a static c and c++ library?

Summarize

I'm integrating a static library based on c/c++ into a shared library based on c (using cmake on linux).

I have errors like this: libmylib.so: undefined reference to `std::ios_base::Init::Init()'

The problem is strongly related with the use of c++ and its linking to the shared library. If I avoid the shared library (even another static library) no error occurs. Because of my project I can not avoid that shared library which uses the static library.

How to generate a …

c c++ cmake shared-libraries static-libraries

3
推荐指数
1
解决办法
78
查看次数

标签 统计

c ×1

c++ ×1

cmake ×1

shared-libraries ×1

static-libraries ×1