修改MESA_log动态库链接可执行程序失败问题。cmake配置中隐藏了动态库中的函数符号导致链接失败,添加这些对外提供的函数符号。
This commit is contained in:
@@ -73,10 +73,10 @@ install(FILES conf/MESA_handle_logger.conf DESTINATION /usr/lib/tmpfiles.d/ COMP
|
|||||||
|
|
||||||
|
|
||||||
add_executable(${lib_name}_demo demo/test_handle_logger.c)
|
add_executable(${lib_name}_demo demo/test_handle_logger.c)
|
||||||
target_link_libraries(${lib_name}_demo pthread ${lib_name}_static)
|
target_link_libraries(${lib_name}_demo pthread ${lib_name}_shared)
|
||||||
|
|
||||||
|
|
||||||
add_executable(${lib_name}_consumer shm_consumer/MESA_shm_consumer.c)
|
add_executable(${lib_name}_consumer shm_consumer/MESA_shm_consumer.c)
|
||||||
target_link_libraries(${lib_name}_consumer ${lib_name}_static)
|
target_link_libraries(${lib_name}_consumer ${lib_name}_shared)
|
||||||
|
|
||||||
include(Package)
|
include(Package)
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ CC=gcc
|
|||||||
CFLAGS= -g3 -Wall -fPIC -O -Werror
|
CFLAGS= -g3 -Wall -fPIC -O -Werror
|
||||||
CFLAGS+=-I../inc/
|
CFLAGS+=-I../inc/
|
||||||
|
|
||||||
#LIB=-L../lib/
|
|
||||||
LIB=../lib/libMESA_handle_logger.a ../lib/libMESA_snprintf.a
|
LIB=../lib/libMESA_handle_logger.a
|
||||||
LIB+=-lpthread
|
|
||||||
|
|
||||||
LIB_FILE=$(wildcard ../lib/*.a)
|
LIB_FILE=$(wildcard ../lib/*.a)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
global: MESA*runtime_log*;GIT_VERSION_*;
|
global: MESA*runtime_log*;GIT_VERSION_*;MESA_shm_alloc_overview;MESA_shm_write_ring_queue_to_file;MESA_handle_fmt_rule_register;
|
||||||
local: *;
|
local: *;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user