Results 1 to 10 of 10

Thread: How to use cmath.h with Qt OpenSource and minGW?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Bella Vista, AR
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to use cmath.h with Qt OpenSource and minGW?

    Sure enough - I checked the mingw include library and none of the files have the .h extension. The confusion factor comes with the Qt include library where all files DO have the .h extension.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: How to use cmath.h with Qt OpenSource and minGW?

    Quote Originally Posted by awbaker
    The confusion factor comes with the Qt include library where all files DO have the .h extension.
    Not quite, in Qt4 both versions are available, but the one without ".h" is preferred.

  3. #3
    Join Date
    Jan 2006
    Location
    New Zealand
    Posts
    10
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to use cmath.h with Qt OpenSource and minGW?

    The C++ standard says that if you use #include <foo.h> that there is an actual file someplace called foo.h

    Using the notation #include <foo> makes no assumption about the storage of the "foo" library, it just guarantees the availability of the foo functions to your program.


    Also, the practical difference of <math.h> vs <cmath> is that the formers functions are automatically imported to the current namespace, while the latters aren't.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.