推荐 最新
明道

能帮看一下这个"multiple definition"的make报错吗?

/media/zhzhy/entertain/学习/编程语言/snort/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/../../../../arm-none-linux-gnueabihf/bin/ld: util.o:/home/zhzhy/snort/snort-2.9.81/build/src/../../src/preprocessors/Stream6/stream_common.h:373: multiple definition of `tcp_lws_cache'; snort.o:/home/zhzhy/snort/snort-2.9.81/build/src/../../src/preprocessors/Stream6/stream_common.h:373: first defined here /media/zhzhy/entertain/学习/编程语言/snort/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/../../../../arm-none-linux-gnueabihf/bin/ld: preprocessors/Stream6/libstream6.a(stream_common.o):/home/zhzhy/snort/snort-2.9.81/build/src/preprocessors/Stream6/../../../../src/preprocessors/Stream6/stream_common.h:376: multiple definition of `ip_lws_cache'; snort.o:/home/zhzhy/snort/snort-2.9.81/build/src/../../src/preprocessors/Stream6/stream_common.h:376: first defined here 所幸这些错误都是"multiple definition of...first defined here"的形式.足足几十条,随便选了两条. 比方说第一条 /media/zhzhy/entertain/学习/编程语言/snort/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/../../../../arm-none-linux-gnueabihf/bin/ld: util.o: /home/zhzhy/snort/snort-2.9.81/build/src/../../src/preprocessors/Stream6/stream_common.h:373: multiple definition of `tcp_lws_cache'; snort.o: /home/zhzhy/snort/snort-2.9.81/build/src/../../src/preprocessors/Stream6/stream_common.h:373: first defined here 链接器ld认为,两个.o文件中包含了重复定义的标识符,但这两个标识符的定义位置都是某个文件的373行,这是同一个定义,这是什么问题?同一个定义不就是一样东西吗? 还有第二条. /media/zhzhy/entertain/学习/编程语言/snort/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin/../lib/gcc/arm-none-linux-gnueabihf/10.3.1/../../../../arm-none-linux-gnueabihf/bin/ld: preprocessors/Stream6/libstream6.a(stream_common.o): /home/zhzhy/snort/snort-2.9.81/build/src/preprocessors/Stream6/../../../../src/preprocessors/Stream6/stream_common.h:376: multiple definition of `ip_lws_cache'; snort.o: /home/zhzhy/snort/snort-2.9.81/build/src/../../src/preprocessors/Stream6/stream_common.h:376: first defined here 几乎是一回事,只不过是从两个.o文件变成了一个.a文件和.o文件. 这种问题是怎么回事呢?恳请赐教.

11
1
0
浏览量269
全能人才

纯小白:VSCode用make命令编译错误是什么原因?

刚开始学编程,vscode用make命令出现错误,插件装了环境也配置了,不知道哪里出问题,纯小白 源代码: #include #include int main(void) { printf ("hello world\n"); } 终端命令+错误提示: PS F:\Users\lyt\Desktop\c code> make hello cc hello.c -o hello process_begin: CreateProcess(NULL, cc hello.c -o hello, ...) failed. make (e=2): ?μí3?ò2?μ????¨μ????t?£ : recipe for target 'hello' failed make: * [hello] Error 2 PS F:\Users\lyt\Desktop\c code> 是哪里出问题了?要怎么解决?

0
1
0
浏览量140