Results 1 to 11 of 11

Thread: Cannot open include file: 'QXmlSimpleReader': No such file or directory

  1. #1
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Cannot open include file: 'QXmlSimpleReader': No such file or directory

    When trying to include <QXmlSimpleReader> I get an error:
    Qt Code:
    1. Error 1 fatal error C1083: Cannot open include file: 'QXmlSimpleReader': No such file or directory
    To copy to clipboard, switch view to plain text mode 
    Im using Visual Studio 2008.But even using QT Creator I get the same error. Why cant they find it? Thanks.

    Update: Apparently any QXml include isn't being found.
    Last edited by been_1990; 12th June 2009 at 01:04.

  2. #2
    Join Date
    Jun 2009
    Posts
    11
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    You have to add the XML library of QT to your Makefile or .pro file.

  3. #3
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    And how do I do that?

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    Quote Originally Posted by been_1990 View Post
    And how do I do that?
    Qt += xml

    Look at the documentation under the QtSql Module!

  5. The following user says thank you to Lykurg for this useful post:

    giacomelli.fabio (29th December 2009)

  6. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    add QT += xml in your pro-file and rebuild project.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  7. #6
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    I get the same error after adding "QT += xml" to my .pro file.
    Here is my .pro:
    Qt Code:
    1. TARGET = IconView
    2. TEMPLATE = app
    3. SOURCES += main.cpp \
    4. widget.cpp \
    5.  
    6. HEADERS += widget.h \
    7.  
    8. FORMS += widget.ui \
    9.  
    10. RESOURCES += res.qrc
    11.  
    12. Qt += xml
    To copy to clipboard, switch view to plain text mode 

  8. #7
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    Have you truly/complete rebuilded your project? Try #include <QtSql> instead, same error? Have you build aour At installation with Xml support?

  9. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    There are a few errors in your .pro file:

    Quote Originally Posted by been_1990 View Post
    Qt Code:
    1. TARGET = IconView
    2. TEMPLATE = app
    3. SOURCES += main.cpp \
    4. widget.cpp \ # <-- remove '\', the list of sources doesn't continue on the next line
    5.  
    6. HEADERS += widget.h \ # <-- remove '\', the list of headers doesn't continue on the next line
    7.  
    8. FORMS += widget.ui \ # <-- remove '\', the list of forms doesn't continue on the next line
    9.  
    10. RESOURCES += res.qrc
    11.  
    12. Qt += xml # <-- it should be "QT", not "Qt"
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  10. #9
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    Ok, compiling in QtCreator , both #include <QXmlSimpleReader> and #include <QtSql> work. But now what about #include <QtXmlPatterns>? It doesnt work. Gives me the same error.
    .pro:
    Qt Code:
    1. TARGET = IconView
    2. TEMPLATE = app
    3. SOURCES += main.cpp \
    4. widget.cpp
    5.  
    6. HEADERS += widget.h
    7.  
    8. FORMS += widget.ui
    9.  
    10. RESOURCES += res.qrc
    11.  
    12. QT += xml
    13. QT += sql
    To copy to clipboard, switch view to plain text mode 

  11. #10
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    Quote Originally Posted by been_1990 View Post
    Ok, compiling in QtCreator , both #include <QXmlSimpleReader> and #include <QtSql> work. But now what about #include <QtXmlPatterns>?
    Come on, read the documentation! It's the same like the xml-module. Doc under QtXmlPatterns->Running the query engine from your Qt application!

  12. #11
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Cannot open include file: 'QXmlSimpleReader': No such file or directory

    Ok, thanks for the help! Problem solved!

Similar Threads

  1. QApplication: no such file or directory
    By jochen_r in forum Newbie
    Replies: 13
    Last Post: 15th November 2008, 22:46
  2. Replies: 3
    Last Post: 29th June 2007, 09:32
  3. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 16:21
  4. QApplication: No such file or directory
    By Dolinski in forum Newbie
    Replies: 4
    Last Post: 24th May 2007, 06:13
  5. errors while installing Qt4.2 in Linux
    By nimmyj in forum Installation and Deployment
    Replies: 11
    Last Post: 13th December 2006, 12:58

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.