Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tcl模块:未找到架构x86_64的符号_C_Linux_Architecture_Swig - Fatal编程技术网

Tcl模块:未找到架构x86_64的符号

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

我正在从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 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
添加到编译命令的末尾。