Unsolved Dealing with float.h and float.h
-
In compiling the svg module of Qt with MinGW 64bit I find that it crashes
when seeking the FLT_EPSILON define. It should be in float.h but I find
that this float.h :D:\MinGW\64\x86_64-w64-mingw32\include\float.h 2015-06-25 17:57
does not have the define, but this :
D:\MinGW\64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\float.h 2015-06-28 07:40
does !!!! have the define.
Seems odd that a file like float.h in two different places has different contents.
Isn't this particular file copyrighted or standard or nailed to the wall in any way? Almost holy?what is the right way to handle this?
- rewrite some of the qtsvg module source code to
#include "D:\MinGW\64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\float.h"
or
- redefine the include folders and restart the whole configure and make process again??
-
Do you have to declare anywhere the base folder for includes?
IIRC, you basically have to start somewhere the compiler and it shall use automatically the correct path.
@Rapidrain said in Dealing with float.h and float.h:
- rewrite some of the qtsvg module source code to
#include "D:\MinGW\64\lib\gcc\x86_64-w64-mingw32\5.1.0\include\float.h"
This is not a good idea to have am include file read from a specific absolute path file
@Rapidrain said in Dealing with float.h and float.h:
- redefine the include folders and restart the whole configure and make process again??
If you did not have a chance to define somewhere the include path and this definition might be wrong, this is not a real option either.
I saw that MinGW 5.1.0 is not the last version which is also used by Qt. There is already MinGW 5.3.0 available. That seem to be an option to try.
-
Thanks for the info koahnig but it doesn't solve the problem. I've cheated and changed the
absolute path to float.h in the Qt source code ... qtsvghandler.cpp ... and the compiling goes on.My question is how in the name of everything can two header files float.h and float.h have such radically different contents????
The compiler, a g++ file is unable to define the include paths automatically. During configure, the very start of this whole process, I define where my MinGW includes are located. The compiler doesn't make that call.
I don't think that the compiler runs #include "float.h", sees an error and then automatically jumps to the proper include directory to use a different file with the same name.At first I used :
/d/Qt64/qt-source/configure -prefix /d/Qt64/qt-build -I/d/Qt/Tools/mingw530_32/i686-w64-mingw32/include -confirm-license -debug-and-release -opensource -platform win32-g++ -opengl desktop -nomake examples -nomake tests -qt-zlib -D ASSIMP_BUILD_NO_OWN_ZLIB -Wno-unknown-pragmas -Wa,-mbig-objHere I used an include folder within the 32 bit Qt installation
result : its float.h doesn't know what FLT_EPSILON is so the qtsvg module fails to build.
So....plans for the future :
Just for fun I'll try a different include directory -I/d/MinGW/64/lib/gcc/x86_64-w64-mingw32/5.1.0/include and see what happens