lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 355 forks source link

测试的文件怎么编译成二进制文件 #156

Closed zhuzhuaicoding closed 6 years ago

zhuzhuaicoding commented 6 years ago

你好, 编译出来的的测试可执行文件有办法生成二进制的吗,现在是sh文件,没法debug到对应的源码文件

Reproduction Steps:

  1. cd test
  2. make
  3. ./test_string_render

LCUI version: master OS and version: Ubuntu 18.04 Build tools: gcc

lc-soft commented 6 years ago

二进制文件在 test/.libs 目录下,直接运行的话,可能会报错找到不到 .so 依赖库。

image

zhuzhuaicoding commented 6 years ago

为什么你的可以找到.so文件,我运行会报错呢

lc-soft commented 6 years ago

为什么你的可以找到.so文件,我运行会报错呢

@earlymeme 手动编译安装的库文件不会在标准库目录下,你需要手动修改环境变量,加上 /usr/local/lib,或者改用静态库。

具体方法可谷歌/百度搜索,也可咨询其他资深 Linux 程序员。