James
James

Reputation: 55

Dev -Cpp Compiler Build error

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 

Upvotes: 2

Views: 22701

Answers (3)

Sam_Carmichael
Sam_Carmichael

Reputation: 1

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.

Upvotes: 0

Muhammad Kashif Arif
Muhammad Kashif Arif

Reputation: 668

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.

Upvotes: 0

austin
austin

Reputation: 5866

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.

Upvotes: 2

Related Questions