main.cpp 488 B

123456789101112131415161718192021
  1. #include <QCoreApplication>
  2. #include <iostream>
  3. #include "ivdriver_gps_hcp2.h"
  4. int main(int argc, char *argv[])
  5. {
  6. QCoreApplication a(argc, argv);
  7. QString strpath = QCoreApplication::applicationDirPath();
  8. if(argc < 2)
  9. strpath = strpath + "/hcp2.xml";
  10. else
  11. strpath = argv[1];
  12. std::cout<<strpath.toStdString()<<std::endl;
  13. iv::ivmodule * pivmodule = new iv::ivdriver_gps_hcp2(strpath.toStdString());
  14. pivmodule->start();
  15. return a.exec();
  16. }