Tcl模块:未找到架构x86_64的符号
我正在从Swig教程站点运行测试tcl模块: 但是,当我在命令行中输入:Tcl模块:未找到架构x86_64的符号,c,linux,architecture,swig,C,Linux,Architecture,Swig,我正在从Swig教程站点运行测试tcl模块: 但是,当我在命令行中输入:gcc-sharedexample.o example\u wrap.o-o example.so时,它返回: Undefined symbols for architecture x86_64: "_TclFreeObj", referenced from: __wrap_My_variable_get in example_wrap.o __wrap_My_variable_set in ex
gcc-sharedexample.o example\u wrap.o-o example.so
时,它返回:
Undefined symbols for architecture x86_64:
"_TclFreeObj", referenced from:
__wrap_My_variable_get in example_wrap.o
__wrap_My_variable_set in example_wrap.o
.
.
.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
关于这个问题有什么建议吗 您的
gcc
不是gcc
!看起来您至少需要链接一个外部库——可能是libtcl。尝试将选项-ltcl
添加到编译命令的末尾。您的gcc
不是gcc
!看起来您至少需要链接一个外部库——可能是libtcl。尝试将选项-ltcl
添加到编译命令的末尾。