Results 1 to 4 of 4

Thread: QtCore/QtGlobal: No such file or directory

  1. #1
    Join Date
    May 2015
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default QtCore/QtGlobal: No such file or directory

    I am working with QtGStreamer on one of the examples, and I cannot get it to work. I keep getting the error 'QtCore/QtGlobal: No such file or directory' from global.h, when I try #include <QtCore/QtGlobal in main.cpp I don't get an error from that.
    Here is my code:

    main.cpp
    Qt Code:
    1. #include "mediaapp.h"
    2. #include <QApplication>
    3. #include <QGst/Init>
    4.  
    5.  
    6. int main(int argc, char *argv[])
    7. {
    8. QApplication app(argc, argv);
    9. QGst::init(&argc, &argv);
    10.  
    11. MediaApp media;
    12. media.show();
    13.  
    14. if (argc == 2) {
    15. media.openFile(argv[1]);
    16. }
    17.  
    18. return app.exec();
    19. }
    To copy to clipboard, switch view to plain text mode 

    player.pro
    Qt Code:
    1. TEMPLATE = app
    2. TARGET = player
    3.  
    4. CONFIG += silent
    5.  
    6. CONFIG += pkgconfig
    7.  
    8. contains(QT_VERSION, ^4\\..*) {
    9. PKGCONFIG += QtGStreamer-1.0 QtGStreamerUi-1.0
    10. }
    11. contains(QT_VERSION, ^5\\..*) {
    12. PKGCONFIG += Qt5GStreamer-1.0 Qt5GStreamerUi-1.0\
    13. }
    14.  
    15. QT += core quick widgets
    16. CONFIG += qt console bootstrap
    17.  
    18. DEFINES += QT_NO_KEYWORDS
    19.  
    20. HEADERS += mediaapp.h player.h
    21. SOURCES += main.cpp mediaapp.cpp player.cpp
    22.  
    23. INCLUDEPATH += C:\qt-gstreamer-1.2.0\src \
    24. C:\Qt\Qt5.4.1\5.4\mingw491_32\include \
    25. C:\Qt\Qt5.4.1\5.4\android_armv5\include \
    26. C:\Qt\Qt5.4.1\5.4\android_armv7\include \
    27. C:\Qt\Qt5.4.1\5.4\android_x86\include \
    28. C:\Qt\Qt5.4.1\5.4\Src\qtbase\include
    To copy to clipboard, switch view to plain text mode 

    In C:\Qt\...\include there is a directory QtCore with QtGlobal. While typing it in to global.h I get suggestions to put it in, but it throws an error when I try and build it.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QtCore/QtGlobal: No such file or directory

    Start by running "make clean", removing Lines 24-28 from the pro file, removing the QtGlobal include you added, rerunning qmake from the version of Qt that matches the version used by QtGStreamer, and then make.

    If you still get compile errors then post the errors and the compiler command that generated them.

  3. #3
    Join Date
    May 2015
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: QtCore/QtGlobal: No such file or directory

    I am still getting an error, here is the compile output

    17:05:24: Running steps for project player...
    17:05:24: Configuration unchanged, skipping qmake step.
    17:05:24: Starting: "C:\Qt\Qt5.4.1\Tools\mingw491_32\bin\mingw32-make.exe"
    C:/Qt/Qt5.4.1/Tools/mingw491_32/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'C:/qt-gstreamer-1.2.0/examples/build-player-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
    compiling ../../src/QGst/Init.cpp
    In file included from ../../src/QGst/../QGlib/type.h:22:0,
    from ../../src/QGst/global.h:25,
    from ../../src/QGst/init.h:20,
    from ../../src/QGst/Init.cpp:17:
    ../../src/QGst/../QGlib/global.h:26:27: fatal error: QtCore/QtGlobal: No such file or directory
    #include <QtCore/QtGlobal>
    ^
    compilation terminated.
    <builtin>: recipe for target '../../src/QGst/Init' failed
    mingw32-make[1]: *** [../../src/QGst/Init] Error 1
    mingw32-make[1]: Leaving directory 'C:/qt-gstreamer-1.2.0/examples/build-player-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
    makefile:34: recipe for target 'debug' failed
    mingw32-make: *** [debug] Error 2
    17:05:25: The process "C:\Qt\Qt5.4.1\Tools\mingw491_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project player (kit: Desktop Qt 5.4.1 MinGW 32bit)
    When executing step "Make"
    17:05:25: Elapsed time: 00:01.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QtCore/QtGlobal: No such file or directory

    How have you provided a working pkg-config in your Windows build environment?

Similar Threads

  1. Replies: 1
    Last Post: 1st July 2014, 21:46
  2. Replies: 2
    Last Post: 25th July 2013, 06:17
  3. Replies: 1
    Last Post: 23rd May 2011, 04:53
  4. Replies: 4
    Last Post: 9th May 2010, 16:18
  5. How to handle: QtCore/qconfig.h: No such file or directory ?
    By owen_263 in forum Installation and Deployment
    Replies: 2
    Last Post: 7th April 2008, 09:54

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.