Saturday, December 30, 2006

DEV-CPP:: [Linker error] undefined reference to `__cpu_features_init'

在為ECLIPSE 3.2.1 安裝CDT( c/c++ develop tools) 的MinGW5.x 後, DEV-CPP編譯出現以下問題,無法編譯.
=====================
Compiler Output:
---------------------
[Linker error] undefined reference to `__cpu_features_init'
ld returned 1 exit status

Compiler Log:
----------------------
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\user\My Documents\New Folder\hello.cpp" -o "C:\Documents and Settings\user\My Documents\New Folder\hello.exe" -g3 -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3
/mingw/lib/crt2.o:crt1.c:(.text+0x16a): undefined reference to `__cpu_features_init'
collect2: ld returned 1 exit status

Execution terminated
=======================
其中 : ...-L"C:\Dev-Cpp\lib" -g3 /mingw/lib/crt2.o:crt1.c:(.text+0x16a): undefined reference to `__cpu_features_init'
懷疑新裝MinGW5 library 與 dev-cpp 不兼容. dev-cpp 中所有Package 除Windows32API外升至最新版.
更改Dev-CPP設置, Tools->Compiler Options->Directories->Libraries
原c:\Dev-Cpp\lib 外加入 新install 的MinGW的路徑 c:\mingw\lib 移至最上,暫時解決問題.
版本資料
DEV-CPP 5 (4.9.9.2)
GCC/G++ 3.4.2
GNU Make 3.80.0.3
MinGW runtime 3.9
Windows32 API 3.6 (current 3.8)

2 comments:

Anonymous said...

At this time I am going away to do my breakfast,
once having my breakfast coming over again to
read other news.

Also visit my webpage Diablo III

Anonymous said...

You need to take part in a contest for one of the highest quality sites on the
internet. I most certainly will recommend this web site!


my blog post - Arabic Books