Dev -Cpp Compiler Build error

孤者浪人 提交于 2019-12-20 05:11:11

问题


I can't seem to find any thing on how to fix this and i have used Dev-Cpp befor but have never had this problem.I have tried re-installing Dev-Cpp and MinGW but nothing seems to work.

i:\gw\lib\crt2.o(.text+0x8) In function `_mingw_CRTStartup'

[Linker error] undefined reference to `__dyn_tls_init_callback' 

[Linker error] undefined reference to `__cpu_features_init' 

i:\gw\lib\crt2.o(.text+0x8) ld returned 1 exit status 

C:\workspace\cpp\Makefile.win [Build Error]  [Project1.exe] Error 1 

回答1:


Seems like it can't find the MinGW libraries.

Click on Tools -> Compiler Options In the directory tab, right click Libraries and change to the MinGW lib directory. In this example, it was C:\MinGW\lib

This might happen if you uninstall, re-install, or upgrade MinGW.




回答2:


if you have install Migwin or cygwin in C then try to install Dev C++ on other directory with latest version. Old version on another directory will still may give you the same error. My problem has been resolve by doing this.




回答3:


I had an error similar to this in Dev-Cpp (4.9.9.2) after installing MinGW32.

[Linker error] undefined reference to `__dyn_tls_init_callback'

[Linker error] undefined reference to `__cpu_features_init'

Apparently Dev-Cpp was automatically linking to those new libraries and I just changed the name of the MinGW32 folder (default location was inside C:). This fixed the whole problem and Dev-Cpp went back to linking the correct libraries when C:\MinGW32 was not accessible. Changing the Dev-Cpp compiler options library did not work in this case.



来源:https://stackoverflow.com/questions/17098217/dev-cpp-compiler-build-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!