undefined reference to `__isnanf'
【from:http://sourceforge.net/p/mingw/bugs/2192/】
I was migrating from cygwingcc to mingw gcc and got a linkage issue
/cygdrive/c/stuff/ChibiOS_2.6.0/demos/Win32-MinGW/main.c:70: undefined reference to `__isnanf'
collect2: error: ld returned 1 exit status
I was not expecting this since the project does compile under cygwin, I have math.h included and I am referencing -lm library.
I've tracked this to -O0 flag: the issues does NOT happen if I use -O1 or -O2, but it does happen in case of -O0.
My versions are
Target: i686-pc-mingw32
Configured with: /usr/src/packages/mingw-gcc/32/mingw-gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/usr/src/packages/mingw-gcc/32/mingw-gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share
--localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/mingw-gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-mingw32 --without-libiconv-prefix --without-libintl-prefix --with-sysroot=/usr/i686-pc-mingw32/sys-root
--with-build-sysroot=/usr/i686-pc-mingw32/sys-root --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --disable-build-poststage1-with-cxx
--enable-version-specific-runtime-libs --disable-multilib --enable-decimal-float=bid --disable-werror --enable-lto
Thread model: win32
gcc version 4.7.3 (GCC)
相關文章
- undefined reference toUndefined
- Qt undefined reference to ***QTUndefined
- "undefined reference to" 問題解決方法Undefined
- undefined reference to錯誤的解決方法Undefined
- Qt 訊號發射部分 undefined reference to錯誤QTUndefined
- codeblocks處理undefined reference to `pthread_create'BloCUndefinedthread
- Linux下使用nm命令排查和解決“undefined reference to ”LinuxUndefined
- C++:與C混合程式設計 CMake undefined reference toC++程式設計Undefined
- sphinx :undefined reference to `libiconv' 報錯解決辦法Undefined
- g++連結報錯:undefined reference to typeinfo of xxxUndefined
- A20核心編譯錯誤undefined reference to `hwmon_device_register編譯Undefineddev
- "undefined reference to strptime"之自己定義strptime函式Undefined函式
- Linux make編譯報錯:undefined reference to `vtable for XXX 'Linux編譯Undefined
- undefined reference to `libiconv_open 無法編譯PHP libiconvUndefined編譯PHP
- 【備忘】解決錯誤:undefined reference to `cv::imread(cv::String const&, int)‘Undefined
- 從連結器的角度詳細分析g++報錯: (.text+0x24): undefined reference to `main'UndefinedAI
- null == undefined ?NullUndefined
- share undefinedUndefined
- VS Code/Code-Runner編譯C語言遇到undefined reference to XXX的一種解決辦法編譯C語言Undefined
- Java referenceJava
- 關於 UndefinedUndefined
- undefined和nullUndefinedNull
- null 和 undefinedNullUndefined
- Uncaught TypeError: $(...).attr(...) is undefinedErrorUndefined
- 深入探討 UndefinedUndefined
- undefined與null與?. ??UndefinedNull
- GCDAsyncSocket_ReferenceGC
- Python - ReferencePython
- 程式碼會引發 Notice: Undefined variable: undefined_variable 錯誤Undefined
- undefined 和 null 區別?UndefinedNull
- compact (): Undefined variable: operatorUndefined
- null和undefined區別NullUndefined
- node 報錯 deprecated undefinedUndefined
- IE 異常"_doPostBack is undefined"Undefined
- Angular 2 Forward ReferenceAngularForward
- 譯|There Are No Reference Types in GoGo
- UNIX Quick Reference SheetUI
- JavaScript undefined與null區別JavaScriptUndefinedNull