[英]Eclipse CDT errors when building files
When trying to build a simple Hello world program in C and Elcipse, I get the following errors: 尝试使用C和Elcipse构建简单的Hello world程序时,出现以下错误:
make: *** [C.exe] Error 1 CC/C++ Problem make:*** [C.exe]错误1 CC / C ++问题
recipe for target 'C.exe' failed makefile /C/Debug line 29 C/C++ Problem 目标'C.exe'的配方生成文件失败/ C / Debug第29行C / C ++问题
undefined reference to `WinMain' C line 39, external location: C:\\cygwin64\\usr\\src\\debug\\cygwin-1.7.33-1\\winsup\\cygwin\\lib\\libcmain.c C/C++ Problem 未定义引用'WinMain'C行39,外部位置:C:\\ cygwin64 \\ usr \\ src \\ debug \\ cygwin-1.7.33-1 \\ winsup \\ cygwin \\ lib \\ libcmain.c C / C ++问题
I'm using Cygwin. 我正在使用Cygwin。 How can I fix this?
我怎样才能解决这个问题? I am selected the Cygwin toolchain, and I have the PATH set to C:\\cygwin64\\bin.
我选择了Cygwin工具链,并且将PATH设置为C:\\ cygwin64 \\ bin。
The undefined reference means you are missing a library. 未定义的引用表示您缺少库。 To set this up right click the project, select
Properties
-> C/C++ General
-> Paths and Symbols
-> Libraries
and Libraries Paths
. 要在项目上单击鼠标右键,请选择“
Properties
->“ C/C++ General
-> Paths and Symbols
->“ Libraries
和Libraries Paths
。 Add the appropriate library and build again. 添加适当的库并再次构建。
Also look here - gcc-undefined-reference-to and here . 还要看这里-gcc-undefined-reference-to和这里 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.