我最近安装了 Ubuntu 和 Eclipse 来编译一个库(由其他人编写)。我熟悉 C,因此我将所有相关的头文件添加到一个文件夹中,并在 中添加了该文件夹的路径project>properties>paths>GNU C
。在该文件夹中,src
我有一个.c
包含主函数的文件和.c
包中提供的几个文件,这些文件在主文件中调用.c
(未命名但 )。
这是我构建项目后的输出(使用工具链 Linux GCC 和 GNU builder):
15:43:57 **** Incremental Build of configuration Release for project Delaunay_test ****
make all
Building file: ../src/detri.c
Invoking: GCC C Compiler
gcc -I/media/HDD/Programming/C/Detri_2.6.a/Headers -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/detri.d" -MT"src/detri.d" -o "src/detri.o" "../src/detri.c"
In file included from /media/HDD/Programming/C/Detri_2.6.a/Headers/trist.h:8:0,
from /media/HDD/Programming/C/Detri_2.6.a/Headers/dt.h:8,
from /media/HDD/Programming/C/Detri_2.6.a/Headers/detri.h:5,
from ../src/detri.c:41:/media/HDD/Programming/C/Detri_2.6.a/Headers/basic.h:65:8: error: conflicting types for ‘bzero’
/media/HDD/Programming/C/Detri_2.6.a/Headers/basic.h:66:8: error: conflicting types for ‘bcopy’
/media/HDD/Programming/C/Detri_2.6.a/Headers/basic.h:100:0: warning: "HIBITS" redefined [enabled by default]
/usr/include/values.h:48:0: note: this is the location of the previous definition
/media/HDD/Programming/C/Detri_2.6.a/Headers/basic.h:102:0: warning: "HIBITL" redefined [enabled by default]
/usr/include/values.h:49:0: note: this is the location of the previous definition
/media/HDD/Programming/C/Detri_2.6.a/Headers/basic.h:204:0: warning: "powerof2" redefined [enabled by default]
/usr/include/i386-linux-gnu/sys/param.h:72:0: note: this is the location of the previous definition
../src/detri.c:110:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
make: *** [src/detri.o] Error 1
15:43:58 Build Finished (took 328ms)
如果我将工具链更改为 mingw 或其他东西,它会表明该系统不支持它,但仍然会构建。
构建完成后,运行它会产生以下错误消息:
Binary not found
任何帮助都将受到赞赏。