Home > Back-end >  The dynamic library to link static library
The dynamic library to link static library

Time:09-19

1, GCC, and ld version is as follows:
Lixiangtao @ ubuntu: ~/kiwi_voice/SRC/tonlyapps/libffmpegplayer $ld - version
The GNU ld (GNU Binutils for Ubuntu) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.,
This program is free software; You may redistribute it under the terms of
The GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no giant.
Lixiangtao @ ubuntu: ~/kiwi_voice/SRC/tonlyapps/libffmpegplayer $GCC - version
GCC (Ubuntu 5.4.0-6 ubuntu1 ~ 16.04.5) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.,
This is free software; See the source for copying the conditions. There is NO
The giant; Not even for MERCHANTABILITY or FITNESS for A PARTICULAR PURPOSE.

2, the problem: unable to successfully link static library:
(1) the original makefile fragment:
Librender_audio_plugin: TARGET:=librender_audio_plugin. So
Librender_audio_plugin: $(OBJS - RENDER - AUDIO)
$(warning suh25ssssssssssssssssssssssssssssss $(LD) SSSSSSSSSSSSSSSSSSSSSSSSSS)
$$(LD) - o (TARGET) $(OBJS - RENDER - AUDIO) $(LDFLAGS) $(LIBS) - O2 \
- lc $(LIBGCC);
$(RM) $(BINDIR) output/plugins/$(TARGET)
Install - m $777 (TARGET) $(BINDIR) output/plugins
(2) after adding links static library makefile fragment:
Librender_audio_plugin: TARGET:=librender_audio_plugin. So
Librender_audio_plugin: $(OBJS - RENDER - AUDIO)
$(warning suh25ssssssssssssssssssssssssssssss $(LD) SSSSSSSSSSSSSSSSSSSSSSSSSS)
$$(LD) - o (TARGET) $(OBJS - RENDER - AUDIO) $(LDFLAGS) $(LIBS) - ltl_playermanager lavformat - lavcodec lavutil - O2 \
- lc $(LIBGCC);
$(RM) $(BINDIR) output/plugins/$(TARGET)
Install - m $777 (TARGET) $(BINDIR) output/plugins
At link time increased by four static library - ltl_playermanager - lavformat - lavcodec - lavutil, whether these four static library exists, the compiler will not complain, generated by the dynamic library size will not change,
3, the compilation process is as follows:
Makefile: 427: suh25ssssssssssssssssssssssssssssss/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld - Shared SSSSSSSSSSSSSSSSSSSSSSSSSS
/home/lixiangtao kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 - poky - Linux/aarch64 - poky - Linux - ld -shared -o librender_audio_plugin. So component/render with alsa. O component/render/format. O component/render/chmixer. O component/render/iis_driver. O component/render/snd_driver. O - L../output/bin - L../output/lib, hash - style=gnu lpthread - lm - LDL -- lmad -- lfaad ltremor - lflac - logg - LGPG - error - lgcrypt - lmedia - lasound - ltl_playermanager - lavformat - lavcodec lavutil - O2 \
- lc/home/lixiangtao/kiwi_voice/SRC/tonlyapps libffmpegplayer/libmedia/../../../../build/TMP/sysroots/x86_64 - Linux/usr/bin/aarch64 poky - Linux/../../../../aud8516 - SLC - tcbootstrap/usr/lib64/aarch64 - poky - Linux/6.2.0 libgcc. A;
rm -f ../output/plugins/librender_audio_plugin. So
Install the -m 777 librender_audio_plugin. So.. The output/plugins/

We had several days, no progress, a great god help,

Grateful!

CodePudding user response:

(2) after adding links static library makefile fragment:
Librender_audio_plugin: TARGET:=librender_audio_plugin. So
Librender_audio_plugin: $(OBJS - RENDER - AUDIO)
$(warning suh25ssssssssssssssssssssssssssssss $(LD) SSSSSSSSSSSSSSSSSSSSSSSSSS)
$$(LD) - o (TARGET) $(OBJS - RENDER - AUDIO) $(LDFLAGS) $(LIBS) - ltl_playermanager lavformat - lavcodec lavutil - O2 \
- lc $(LIBGCC);
$(RM) $(BINDIR) output/plugins/$(TARGET)
Install - m $777 (TARGET) $(BINDIR) output/plugins

CodePudding user response:

C the Run - Time Libraries https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx

CodePudding user response:

The somebody else all GCC laozhao also Microsoft

CodePudding user response:

refer to the second floor zhao4zhong1 response:
C Run - Time Libraries https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx


I this is Linux GCC!

CodePudding user response:

reference 4 floor huashibuliao response:
Quote: refer to the second floor zhao4zhong1 response:

C the Run - Time Libraries https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx


I this is Linux GCC!

Principle is common,

CodePudding user response:

reference 5 floor zhao4zhong1 reply:
Quote: refer to 4th floor huashibuliao response:

Quote: refer to the second floor zhao4zhong1 response:

C the Run - Time Libraries https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx


I this is Linux GCC!

On the common principle,


Look not to understand ah, seek advice!

CodePudding user response:

Link is successful, but the generated file size did not increase, there is no new symbols generated file
  • Related