SubDirs project with DLL - Problems



  • I have created this Test project that contains a executable and a .dll.

    https://github.com/Zingam/QbsProjectTemplates/tree/master/Qt/QtWidgetsSubProjects

    It contains Qbs project and QMake project. With the Qbs I have no problems but I cannot make the QMake one work.
    What would be a proper setup like that?
    For example one problem is that I cannot figure out how to properly include the library header (cannot setup the include path).

    Then my project contains an "make install" step. If I add this step then Qt Creator won't compile and output the .DLL to the DESTDIR directory. What I need to do is first to compile and then add "make install" which is not desirable.


  • Lifetime Qt Champion

    Hi,

    What problem do you have ? That projects builds fine from the command line with qmake



  • @SGaist
    I use Qt Creator. If I delete all settings (the user file) and builds (to have just a clean source) then I open the .pro file, then I add "install" to make and lastly I try to build and I get: :-1: error: LNK1104: cannot open file 'Lib.lib'
    Without the "install" step the project gets built. If I add "install" after that initial build is completed the assets will get copied and everything will work. But if I try the initial build with "install" I get the link error.

    Apparently the install step causes the problem. I just don't know if I am doing something wrong or is it a bug.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.