Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6326883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:10:28+00:00 2026-05-24T17:10:28+00:00

I have a library and I would like it to copy itself to a

  • 0

I have a library and I would like it to copy itself to a directory depending upon what configuration i’m in (debug or release). Here is my project file.

#-------------------------------------------------
#
# Project created by QtCreator 2011-08-13T12:48:33
#
#-------------------------------------------------

TARGET = JECLibrary
TEMPLATE = lib

DEFINES += JECLIBRARY_LIBRARY

SOURCES += \
    JECMessageText.cpp \
    JECMessageCombo.cpp \
    JECButton.cpp

HEADERS +=\
        JECLibrary_global.h \
    JECMessageText.h \
    JECMessageCombo.h \
    JECButton.h

CONFIG(debug, debug|release)
{
    DLLDESTDIR += $$quote(../../../Jane/Jane/Build/debug)
    message("Copying to Jane Debug Directory.")
}
CONFIG(release, debug|release)
{
    DLLDESTDIR += $$quote(../../../Jane/Jane/Build/release)
    message("Copying to Jane Release Directory.")
}

FORMS += \
    JECMessageText.ui \
    JECMessageCombo.ui

For some reason, the debug or release DLL are copied to both directories instead of just one. So if I run in release mode, I get the release DLL in both the Debug directory and release directory.

I’m totally confused. Could someone shed some light on this? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:10:28+00:00Added an answer on May 24, 2026 at 5:10 pm

    The opening brace should be on the same line as the condition:

    CONFIG(debug, debug|release) {
        DLLDESTDIR += $$quote(../../../Jane/Jane/Build/debug)
        message("Copying to Jane Debug Directory.")
    }
    CONFIG(release, debug|release) {
        DLLDESTDIR += $$quote(../../../Jane/Jane/Build/release)
        message("Copying to Jane Release Directory.")
    }
    

    or

    CONFIG(debug, debug|release) {
        DLLDESTDIR += $$quote(../../../Jane/Jane/Build/debug)
        message("Copying to Jane Debug Directory.")
    } else {
        DLLDESTDIR += $$quote(../../../Jane/Jane/Build/release)
        message("Copying to Jane Release Directory.")
    }
    

    But both messages will be displayed, because the files Makefile.Debug and Makefile.Release are both created when you run qmake (on Windows, or if you add debug_and_release to the CONFIG variable on other OSes).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a library written in C that I would like to use in
I have downloaded an iOS project and would like to know how to import
I have an class and I would like to use the standard library list
I would like to extend the Queue.PriorityQueue described here: http://docs.python.org/library/queue.html#Queue.PriorityQueue The queue will hold
We have a Library Project that we use for all our central reused code
I would like to know how you normally deal with this situation: I have
I have a simple Java POJO that I would copy properties to another instance
I would like to understand better the mechanics and the issues behind creating library
I have a project, but I don't know which library that I could use
I have an asp.net mvc project and reference a dll to a class library.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.