Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Problem with *.XSD files in resources

Problem with *.XSD files in resources

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 2 Posters 5.6k Views
  • 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 Offline
    J Offline
    Jirka
    wrote on 2 Dec 2011, 15:57 last edited by
    #1

    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
    0
    • J Offline
      J Offline
      Jirka
      wrote on 2 Dec 2011, 16:19 last edited by
      #2

      I forgot write : I use QT 4.7.4

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LarsG
        wrote on 2 Dec 2011, 20:33 last edited by
        #3

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

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jirka
          wrote on 2 Dec 2011, 20:40 last edited by
          #4

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

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jirka
            wrote on 2 Dec 2011, 20:43 last edited by
            #5

            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
            0
            • L Offline
              L Offline
              LarsG
              wrote on 2 Dec 2011, 20:50 last edited by
              #6

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

              Edit: forget what I said :)

              1 Reply Last reply
              0
              • L Offline
                L Offline
                LarsG
                wrote on 2 Dec 2011, 20:59 last edited by
                #7

                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
                0
                • J Offline
                  J Offline
                  Jirka
                  wrote on 2 Dec 2011, 21:21 last edited by
                  #8

                  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
                  0
                  • L Offline
                    L Offline
                    LarsG
                    wrote on 2 Dec 2011, 21:47 last edited by
                    #9

                    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
                    0
                    • J Offline
                      J Offline
                      Jirka
                      wrote on 2 Dec 2011, 22:07 last edited by
                      #10

                      good idea
                      thanks

                      1 Reply Last reply
                      0

                      1/10

                      2 Dec 2011, 15:57

                      • Login

                      • Login or register to search.
                      1 out of 10
                      • First post
                        1/10
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved