我正在尝试运行来自 tiny cc (tcc-0.9.26-win64-bin.zip) 的示例,名为
我已经从
我有什么遗漏吗?
libtcc_test.c
。我已经从
libtcc
中复制了libtcc.h
到include
并将libtcc.def
复制到lib
目录下。
然后我运行tcc ./examples/libtcc_test.c
,但是却得到了一个链接错误 :/tcc: error: undefined symbol 'tcc_new'
tcc: error: undefined symbol 'tcc_set_lib_path'
tcc: error: undefined symbol 'tcc_set_output_type'
tcc: error: undefined symbol 'tcc_compile_string'
tcc: error: undefined symbol 'tcc_add_symbol'
tcc: error: undefined symbol 'tcc_relocate'
tcc: error: undefined symbol 'tcc_get_symbol'
tcc: error: undefined symbol 'tcc_delete'
我有什么遗漏吗?
更多信息:
P:\cpp\tcc>tcc ./examples/libtcc_test.c -vv
tcc version 0.9.26 (i386 Win32)
-> ./examples/libtcc_test.c
-> p:/cpp/tcc/include/stdlib.h
-> p:/cpp/tcc/include/_mingw.h
-> p:/cpp/tcc/include/stddef.h
-> p:/cpp/tcc/include/stdarg.h
-> p:/cpp/tcc/include/limits.h
-> p:/cpp/tcc/include/sec_api/stdlib_s.h
-> p:/cpp/tcc/include/stdlib.h
-> p:/cpp/tcc/include/malloc.h
-> p:/cpp/tcc/include/stdio.h
-> p:/cpp/tcc/include/vadefs.h
-> p:/cpp/tcc/include/sec_api/stdio_s.h
-> p:/cpp/tcc/include/stdio.h
-> p:/cpp/tcc/include/string.h
-> p:/cpp/tcc/include/sec_api/string_s.h
-> p:/cpp/tcc/include/string.h
-> p:/cpp/tcc/include/libtcc.h
-> p:/cpp/tcc/lib/libtcc1.a
-> p:/cpp/tcc/lib/msvcrt.def
-> p:/cpp/tcc/lib/kernel32.def
tcc: error: undefined symbol 'tcc_new'
tcc: error: undefined symbol 'tcc_set_lib_path'
tcc: error: undefined symbol 'tcc_set_output_type'
tcc: error: undefined symbol 'tcc_compile_string'
tcc: error: undefined symbol 'tcc_add_symbol'
tcc: error: undefined symbol 'tcc_relocate'
tcc: error: undefined symbol 'tcc_get_symbol'
tcc: error: undefined symbol 'tcc_delete'