Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Dealing with float.h and float.h

Dealing with float.h and float.h

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rapidrain
    wrote on last edited by Rapidrain
    #1

    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?

    1. 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

    1. redefine the include folders and restart the whole configure and make process again??
    K 1 Reply Last reply
    0
    • R Rapidrain

      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?

      1. 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

      1. redefine the include folders and restart the whole configure and make process again??
      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

      @Rapidrain

      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:

      1. 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:

      1. 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.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • R Offline
        R Offline
        Rapidrain
        wrote on last edited by
        #3

        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-obj

        Here 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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved