# Error 1 /usr/local/Cellar/gcc/8.3.0/bin/g++-8 -shared qwrap.o -o qwrap.so Undefined symbols for architecture x86_64: "_TclFreeObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_AppendPrintfToObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_AppendToObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_CreateObjCommand", referenced from: _Qwrap_Init in qwrap.o "_Tcl_DuplicateObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_EvalEx", referenced from: _Qwrap_Init in qwrap.o do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_EvalObjEx", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_EvalObjv", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_GetByteArrayFromObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_GetDoubleFromObj", referenced from: parse_vector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*) in qwrap.o parse_ivector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*, bool) in qwrap.o "_Tcl_GetIntFromObj", referenced from: parse_ivector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*, bool) in qwrap.o do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_GetObjResult", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_GetString", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_InvalidateStringRep", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_ListObjGetElements", referenced from: parse_vector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*) in qwrap.o parse_ivector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*, bool) in qwrap.o "_Tcl_NewIntObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_NewStringObj", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_ObjPrintf", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_SetResult", referenced from: parse_vector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*) in qwrap.o parse_ivector(Tcl_Obj*, std::__1::vector >&, Tcl_Interp*, bool) in qwrap.o do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "_Tcl_WrongNumArgs", referenced from: do_qwrap(void*, Tcl_Interp*, int, Tcl_Obj* const*, bool) in qwrap.o "std::__1::__vector_base_common::__throw_length_error() const", referenced from: std::__1::vector >::__append(unsigned long) in qwrap.o std::__1::vector >::__append(unsigned long) in qwrap.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *** [qwrap.so] Error 1 # Error 2 cc -E -shared qwrap.o -o qwrap.so clang: warning: qwrap.o: 'linker' input unused [-Wunused-command-line-argument] clang: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument] tclsh mkindex.tcl no files matched glob pattern "qwrap.so" while executing "glob -directory $dir -tails -types {r f} -- {*}$patternList" (procedure "pkg_mkIndex" line 53) invoked from within "pkg_mkIndex . qwrap.so" (file "mkindex.tcl" line 2) make: *** [pkgIndex.tcl] Error 1