Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Qt resources
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt resources

Scheduled Pinned Locked Moved General and Desktop
qt resorces
3 Posts 2 Posters 2.0k Views 2 Watching
  • 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.
  • G Offline
    G Offline
    GrahamL
    wrote on 13 Oct 2015, 11:27 last edited by GrahamL
    #1

    Hi
    I have developed an application using visual studio using the Qt plugin.
    This application consists of numerous dynamic libraries which have their own resource files.
    Now, when I come to use these resources within the library I find that I cannot access them unless I add the .qrc file to the application project.
    Is this the only way to achieve this or is there a better way?
    I have tried using Q_INIT_RESOURCE macro but this gives me an unresolved linker errror

    JobManager.obj : error LNK2019: unresolved external symbol "int __cdecl qInitResources_JobMangement(void)" (?qInitResources_JobMangement@@YAHXZ) referenced in function "private: void __thiscall JobManagement::JobManager::onASLCreateJob(void)" (?onASLCreateJob@JobManager@JobManagement@@AAEXXZ)
    1>Build\Debug\JobManagementd.dll : fatal error LNK1120: 1 unresolved externals
    

    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 Oct 2015, 20:48 last edited by
      #2

      Hi,

      Did you follow the documentation Q_INIT_RESOURCE about initialization with DLLs ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GrahamL
        wrote on 14 Oct 2015, 07:20 last edited by
        #3

        Hi
        Thanks for your reply
        I have solved this issue by including the generated qrc_xxx.cpp in my visual studio project

        1 Reply Last reply
        0

        1/3

        13 Oct 2015, 11:27

        • Login

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