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. [SOLVED] NetCDF

[SOLVED] NetCDF

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.5k 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.
  • G Offline
    G Offline
    goalie39
    wrote on 25 Apr 2014, 14:35 last edited by
    #1

    Hi All:

    I'm wondering if anyone has had any success working with NetCDF and the mingw version of Qt. I haven't really found any topics on here related to NetCDF. I know Unidata provides a set of libraries built with the Visual Studio C compiler, however, I don't have a license for that compiler.

    This is where my inexperience comes through. Is it possible to:
    (1) Use the visual studio built libraries with the mingw Qt, and if so...
    (2) Can I call those C routines from Qt?

    Thanks!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Apr 2014, 21:31 last edited by
      #2

      Hi,

      Did you consider using the Visual Studio Express edition ? It's free to use

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        ChrisW67
        wrote on 25 Apr 2014, 21:44 last edited by
        #3

        If it is a pure C interface then you should be able to use the binary DLLs in your MingW-based project by linking directly against the DLL (rather than the MSVC link library). Failing that you can use the MSVC compilers found in the Windows Sdk 7.1 (not 8+) or the current Visual Studio Express edition.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goalie39
          wrote on 26 Apr 2014, 05:17 last edited by
          #4

          Thanks for the help guys. After some digging, I found that the whole reason I couldn't get it to work was that there were further libraries required by the NetCDF library that I wasn't including in my build. The C based libraries do work just fine as ChrisW67 predicted and pull into Qt without any issues thus far.

          Adding:

          @
          LIBS += -LC:/netcdf/bin_qt -lnetcdf -lhdf5 -lz -lcurl
          INCLUDEPATH += C:/netcdf/include
          @

          Corrected the problem where "bin_qt" contains the following dll's:

          netcdf.dll

          hdf5.dll

          hdf5_hl.dll

          libcurl.dll

          szip.dll

          zlib.dll

          zlib1.dll

          And "include" contains:

          netcdf.h

          Thanks for helping push me down the right path.

          1 Reply Last reply
          0

          1/4

          25 Apr 2014, 14:35

          • Login

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