gcc soname无法识别的命令行 [英] gcc soname unrecognized command line

查看:565
本文介绍了gcc soname无法识别的命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编译 sipXtapi ,我需要用这行代码编译

  gcc -shared -DPIC .libs / codec_pcmapcmu_la-CodecPcmaWrapper.o .libs / codec_pcmapcmu_la-CodecPcmuWrapper.o .libs / codec_pcmapcmu_la-G711.o .libs / codec_pcmapcmu_la-PlgPcmaPcmu.o -lc -W1,-soname = codec_pcmapcmu。 so -o .libs / codec_pcmapcmu.so 
gcc:error:无法识别的命令行选项'-W1,-soname = codec_pcmapcmu.so'

,这是 Makefile.am

  ##使用automake处理此文件以生成Makefile.in 

INCLUDES = -I $(top_srcdir)/ include -I $(top_srcdir)/../ sipXportLib / include -I $(top_srcdir)/ contrib / libspandsp / src

pkgdata_LTLIBRARIES = codec_pcmapcmu.la

codec_pcmapcmu_la_SOURCES = \
CodecPcmaWrapper.c \
CodecPcmuWrapper.c \
G711.c \
PlgPcmaPcmu.c

如果PCMAPCMU_STATIC
codec_pcmapcmu_la_CFLAGS = -DCODEC_STATIC
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version -static else
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version

all-local:codec_pcmapcmu.la
echo安装插件codec_pcmapcmu.so ...
cp -f .libs / codec_pcmapcmu.so @ DEFAULT_CODECS_PATH @

clean-local:
rm -f @ DEFAULT_CODECS_PATH @ / codec_pcmapcmu.so endif

我该如何解决问题?

解决方案

这里有一个拼写错误 -W1 应该是 -Wl (这是一个小写的 L 而不是数字 1

I'm compiling sipXtapi and I need to compile with this line

gcc -shared  -DPIC  .libs/codec_pcmapcmu_la-CodecPcmaWrapper.o .libs/codec_pcmapcmu_la-CodecPcmuWrapper.o .libs/codec_pcmapcmu_la-G711.o .libs/codec_pcmapcmu_la-PlgPcmaPcmu.o   -lc -W1,-soname=codec_pcmapcmu.so -o .libs/codec_pcmapcmu.so
gcc: error: unrecognized command line option ‘-W1,-soname=codec_pcmapcmu.so’

and this is the Makefile.am:

## Process this file with automake to produce Makefile.in

INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/../sipXportLib/include -I$(top_srcdir)/contrib/libspandsp/src

pkgdata_LTLIBRARIES = codec_pcmapcmu.la

codec_pcmapcmu_la_SOURCES = \
CodecPcmaWrapper.c \
CodecPcmuWrapper.c \
G711.c \
PlgPcmaPcmu.c

if PCMAPCMU_STATIC
    codec_pcmapcmu_la_CFLAGS  = -DCODEC_STATIC
    codec_pcmapcmu_la_LDFLAGS = -module -avoid-version -static else
    codec_pcmapcmu_la_LDFLAGS = -module -avoid-version

all-local: codec_pcmapcmu.la
    echo "Installing plugin codec_pcmapcmu.so ..."
    cp -f .libs/codec_pcmapcmu.so @DEFAULT_CODECS_PATH@

clean-local:
    rm -f @DEFAULT_CODECS_PATH@/codec_pcmapcmu.so endif

how can I solve the problem?

解决方案

There's a spelling error there -W1 should be -Wl (that's a lower case L instead of the digit 1)

这篇关于gcc soname无法识别的命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆