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. Copying external dlls to destination directory
Forum Updated to NodeBB v4.3 + New Features

Copying external dlls to destination directory

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 327 Views 1 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.
  • U Offline
    U Offline
    Uday More
    wrote on last edited by
    #1

    I want to copy external libraries dlls to the destination dir i.e debug/release folder through qmake in the .pro file. I have those dlls in "C:\Program Files\MyLib".

    I have the following code :

    // deploy location within the project dir.
    DESTDIR = $$deploy_loc/release

    // MYLIB_HOME = C:\Program Files\MyLib
    copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$(MYLIB_HOME)\bin\mylib.dll) $$shell_path($$DESTDIR)

    Since MYLIB_HOME expands to the above path with space, xcopy gives me an error "Invalid number of arguments" because tof the space.

    The above copyQtData.commands expands to below while building:

    xcopy /s /q /y /i /f C:\Program Files\MyLib\bin\mylib.dll D:\GithubSource\MyProject\Deploy\bin\release.

    Please guide me.

    Pl45m4P 1 Reply Last reply
    0
    • U Uday More

      I want to copy external libraries dlls to the destination dir i.e debug/release folder through qmake in the .pro file. I have those dlls in "C:\Program Files\MyLib".

      I have the following code :

      // deploy location within the project dir.
      DESTDIR = $$deploy_loc/release

      // MYLIB_HOME = C:\Program Files\MyLib
      copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$(MYLIB_HOME)\bin\mylib.dll) $$shell_path($$DESTDIR)

      Since MYLIB_HOME expands to the above path with space, xcopy gives me an error "Invalid number of arguments" because tof the space.

      The above copyQtData.commands expands to below while building:

      xcopy /s /q /y /i /f C:\Program Files\MyLib\bin\mylib.dll D:\GithubSource\MyProject\Deploy\bin\release.

      Please guide me.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Uday-More

      Put your path in quotes.
      "C:\Program Files\.....\"


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • U Offline
        U Offline
        Uday More
        wrote on last edited by
        #3

        @Uday-More said in Copying external dlls to destination directory:

        copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$(MYLIB_HOME)\bin\mylib.dll) $$shell_path($$DESTDIR)

        The command has to be changed to

        copyQtdata.commands += $(COPY_DIR) /f $$shell_quote($$(MYLIB_HOME)\bin\mylib.dll) $$shell_path($$DESTDIR)

        Note : shell_path has been changed to shell_quote.

        It works.

        1 Reply Last reply
        2

        • Login

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