Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Problem with *.XSD files in resources

    Tools
    2
    10
    5007
    Loading More Posts
    • 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.
    • J
      Jirka last edited by

      Hello,

      I have problem. I want to use XSD file as resource file. It contains some useful information.

      Environment : Windows & Visual studio 2005.

      Project *.vcproj is generated from *.pro file by using qmake.

      Extract from *.pro :

      RESOURCES += $$src_project/xml/qt4_pdf_viewer_xml.qrc

      qt4_pdf_viewer_xml.qrc :

      <!DOCTYPE RCC>
      <RCC version="1.0">
      <qresource prefix="/xml/">
      <file>file_list.xsd</file>
      </qresource>
      </RCC>

      Output of compiler:
      1>------ Build started: Project: qt4-pdf-viewer (projects\qt4-pdf-viewer), Configuration: Debug Win32 ------
      1>Creating DataSet class using XSD ...
      1>Writing file 'c:\projects\qt4-pdf-viewer\build\Win32\make\msdev.8\file_list.h'.
      1>file_list.h
      1>c:\projects\qt4-pdf-viewer\build\Win32\make\msdev.8\file_list.h : fatal error C1083: Cannot open compiler generated file: '....\Debug\rels\qt4-pdf-viewer" /link /dll /out:file_list.dll': Invalid argument
      1>Build log was saved at "file://c:\projects\qt4-pdf-viewer\build\Win32\Debug\rels\qt4-pdf-viewer\BuildLog.htm"
      1>qt4-pdf-viewer - 1 error(s), 0 warning(s)
      ========== Build: 0 succeeded, 1 failed, 12 up-to-date, 0 skipped ==========

      !!!!!

      If you:

      1] change qrc file for example to :

      <!DOCTYPE RCC>
      <RCC version="1.0">
      <qresource prefix="/xml/">
      <file>file_list.xsd</file>
      </qresource>
      </RCC>

      2] rebulid project

      So compile pases without problems. Problem is XSD postfix of resource file.
      What is problem ???

      1 Reply Last reply Reply Quote 0
      • J
        Jirka last edited by

        I forgot write : I use QT 4.7.4

        1 Reply Last reply Reply Quote 0
        • L
          LarsG last edited by

          isn't those two qrc files you posted the precise same ?

          1 Reply Last reply Reply Quote 0
          • J
            Jirka last edited by

            No, realy no.
            Difference is only in postfix of file.
            Files exist in both cases.

            1 Reply Last reply Reply Quote 0
            • J
              Jirka last edited by

              Sorry I see it.
              Second valid qrc file is for example :

              <!DOCTYPE RCC>
              <RCC version=“1.0”>
              <qresource prefix=”/xml/”>
              <file>file_list.xxx</file>
              </qresource>
              </RCC>

              Difference is only in postfix contained file.

              1 Reply Last reply Reply Quote 0
              • L
                LarsG last edited by

                maybe the xsd extension enables some type of namespace / validation checking ?

                Edit: forget what I said :)

                1 Reply Last reply Reply Quote 0
                • L
                  LarsG last edited by

                  I see this is related some use of xsd with VS.. then I can't suggest anything helpful.

                  But if that is not the intention then it probarly clashes with this:
                  http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio

                  1 Reply Last reply Reply Quote 0
                  • J
                    Jirka last edited by

                    Thanks. I will try study it.
                    I suppose, that it is some bug in qmake. But I dont know how I can avoid it.
                    Maybe by copying xsd file into other file in first step (realized by independent vcproj project). And compile my proces with qrc contained copy of xsd with different postfix.
                    But it is obscure solution :-).

                    1 Reply Last reply Reply Quote 0
                    • L
                      LarsG last edited by

                      you could compile the ressource file and include as an out of exe ressource, something like rcc -binary ...qrc
                      its of course mentioned in the documentation somewhere.

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jirka last edited by

                        good idea
                        thanks

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post