Board logo

标题: 编译器的问题,请有经验的大个帮帮忙解决! [打印本页]

作者: benq51c    时间: 2006-4-23 18:24     标题: 编译器的问题,请有经验的大个帮帮忙解决!

编译时出现以下的问题!
../FFT_analysis.c:19: multiple definition of `remove_dc'
obj/FFT_analysis.o(.text+0x0):../FFT_analysis.c:19: first defined here
obj/main.o(.text+0x14c): In function `multi_by_window_dmult':
../FFT_analysis.c:43: multiple definition of `multi_by_window_dmult'
obj/FFT_analysis.o(.text+0x14c):../FFT_analysis.c:43: first defined here
obj/main.o(.text+0x2b8): In function `copy2blkfft':
../FFT_analysis.c:69: multiple definition of `copy2blkfft'
obj/FFT_analysis.o(.text+0x2b8):../FFT_analysis.c:69: first defined here
obj/main.o(.text+0x378): In function `FFT':
../FFT_analysis.c:88: multiple definition of `FFT'
obj/FFT_analysis.o(.text+0x378):../FFT_analysis.c:88: first defined here
obj/main.o(.text+0xa48): In function `fft2':
../FFT_analysis.c:178: multiple definition of `fft2'
obj/FFT_analysis.o(.text+0xa48):../FFT_analysis.c:178: first defined here
obj/main.o(.text+0xcac): In function `doperfiltering':
../FFT_analysis.c:222: multiple definition of `doperfiltering'
obj/FFT_analysis.o(.text+0xcac):../FFT_analysis.c:222: first defined here
obj/main.o(.text+0xe14): In function `compute_dEnergy':
../FFT_analysis.c:239: multiple definition of `compute_dEnergy'
obj/FFT_analysis.o(.text+0xe14):../FFT_analysis.c:239: first defined here
obj/main.o(.text+0xf38): In function `compute_dTotal':
../FFT_analysis.c:254: multiple definition of `compute_dTotal'
obj/FFT_analysis.o(.text+0xf38):../FFT_analysis.c:254: first defined here
obj/main.o(.text+0xfcc): In function `compute_r':
../FFT_analysis.c:264: multiple definition of `compute_r'
obj/FFT_analysis.o(.text+0xfcc):../FFT_analysis.c:264: first defined here
obj/main.o(.text+0x109c): In function `compute_th':
../FFT_analysis.c:279: multiple definition of `compute_th'
obj/FFT_analysis.o(.text+0x109c):../FFT_analysis.c:279: first defined here
obj/main.o(.text+0x1178): In function `compute_mean_frequency':
../FFT_analysis.c:295: multiple definition of `compute_mean_frequency'
obj/FFT_analysis.o(.text+0x1178):../FFT_analysis.c:295: first defined here
obj/main.o(.text+0x12ac): In function `compute_mean_angle':
../FFT_analysis.c:312: multiple definition of `compute_mean_angle'
obj/FFT_analysis.o(.text+0x12ac):../FFT_analysis.c:312: first defined here
obj/main.o(.text+0x14c4): In function `copy2fftSrc':
../FFT_analysis.c:334: multiple definition of `copy2fftSrc'
obj/FFT_analysis.o(.text+0x14c4):../FFT_analysis.c:334: first defined here
obj/main.o(.text+0x1550): In function `fft_analysis':
../FFT_analysis.c:344: multiple definition of `fft_analysis'
obj/FFT_analysis.o(.text+0x1550):../FFT_analysis.c:344: first defined here
collect2: ld returned 1 exit status
make: *** [fingerprint.elf] Error 1
Build completed
编译器要求每一个源文件里都要出现MAIN函数,否则就出错.


但一个程序应该只允许一个MAIN函数吧?!!!!


这应该是编译器的问题,请有经验的大个帮帮忙解决!


作者: UseNios    时间: 2006-4-24 14:48

不知道你做了个什么样的设计,能给大家讲一讲么?
作者: kzw    时间: 2006-4-25 10:35

编译器是没有问题的,可能是你的头文件包含的有问题,你查查。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0