Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. QT and GDAL , no errors but the console application not showing anything
Forum Updated to NodeBB v4.3 + New Features

QT and GDAL , no errors but the console application not showing anything

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
4 Posts 3 Posters 582 Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    QT_plt
    wrote on last edited by
    #1

    dera all,
    here is my code :
    #include <QCoreApplication>
    #include <iostream>
    #include<gdal.h>
    #include <gdal_priv.h>
    #include <cpl_conv.h>
    using namespace std;
    #include <iostream>
    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);
    const char *input ="C:/Users/plt/Documents/untitled3/IMAGERY.TIF";
    const char output ="C:/Users/plt/Documents/untitled3/new_IMAGERY.TIF";
    GDALAllRegister();
    GDALDataset pOlDS, * pNewDS;
    GDALDriver pDriverTiff;
    pDriverTiff= GetGDALDriverManager()->GetDriverByName("GTiff");
    pOlDS = (GDALDataset
    ) GDALOpen(input,GA_ReadOnly);
    pNewDS = pDriverTiff->CreateCopy(output, pOlDS, FALSE, NULL, NULL, NULL);
    GDALClose(pOlDS);
    GDALClose(pNewDS);
    /
    ///////////////////////////////////////////////////////////////////////////////////
    /
    system("pause");

    return a.exec();
    }
    i do not have errors and it is executing but the process is not done.

    jsulmJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I don't know that library but I don't see any error checks in your code.

      Also, are you sure that this library supports slashes in file path on Windows ?

      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
      • Q Offline
        Q Offline
        QT_plt
        wrote on last edited by
        #3

        thanks for the zour answer , after checking the ".exe "file i found that the execution in fact had some errors due to missed DLLs , thats why in included the missed ones inside the solution file beside the ".exe" and it worked

        1 Reply Last reply
        0
        • Q QT_plt

          dera all,
          here is my code :
          #include <QCoreApplication>
          #include <iostream>
          #include<gdal.h>
          #include <gdal_priv.h>
          #include <cpl_conv.h>
          using namespace std;
          #include <iostream>
          int main(int argc, char *argv[])
          {
          QCoreApplication a(argc, argv);
          const char *input ="C:/Users/plt/Documents/untitled3/IMAGERY.TIF";
          const char output ="C:/Users/plt/Documents/untitled3/new_IMAGERY.TIF";
          GDALAllRegister();
          GDALDataset pOlDS, * pNewDS;
          GDALDriver pDriverTiff;
          pDriverTiff= GetGDALDriverManager()->GetDriverByName("GTiff");
          pOlDS = (GDALDataset
          ) GDALOpen(input,GA_ReadOnly);
          pNewDS = pDriverTiff->CreateCopy(output, pOlDS, FALSE, NULL, NULL, NULL);
          GDALClose(pOlDS);
          GDALClose(pNewDS);
          /
          ///////////////////////////////////////////////////////////////////////////////////
          /
          system("pause");

          return a.exec();
          }
          i do not have errors and it is executing but the process is not done.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4
          This post is deleted!
          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