打印

CMAKE如何编译出静态库

[复制链接]
1328|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
limee|  楼主 | 2019-8-16 15:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
经过一段时间的折腾,我也入坑CMAKE了

Linking CXX shared library libtag.dll
Creating library file: libtag.dll.a
[ 98%] Built target tag
Scanning dependencies of target tag_c
[100%] Building CXX object bindings/c/CMakeFiles/tag_c.dir/tag_c.obj
Linking CXX shared library libtag_c.dll
Creating library file: libtag_c.dll.a
[100%] Built target tag_c

为什么我编译出的库是共享的,静态库需要如何配置?
谢谢!


使用特权

评论回复

相关帖子

沙发
limee|  楼主 | 2019-8-16 15:20 | 只看该作者
编译的时候还有这2个警告。

-- Could NOT find ZLIB (missing:  ZLIB_INCLUDE_DIR)
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- PKGCONFIG() indicates that cppunit is not installed (install the package whic
h contains cppunit.pc if you want to support this feature)
-- Looking for __RTTI___ in Crun
-- Looking for __RTTI___ in Crun - not found
CMake Warning (dev) in CMakeLists.txt:

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

301

主题

475

帖子

0

粉丝