Results 1 to 3 of 3

Thread: Visual Studio Project Name

  1. #1
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Visual Studio Project Name

    Hi,
    I'm building a static library that needs to have two different target names.
    I would like the debug version to be called "libraryd.lib" and the release version to be called "library.lib".
    I have library.pro set up as:

    TEMPLATE = lib
    CONFIG += qt debug_and_release staticlib

    CONFIG( debug, debug|release ) {
    TARGET = libraryd
    } else {
    TARGET = library
    }

    Unfortunately, when I generate projects with "qmake -t vclib", it generates libraryd.vcproj.
    If I try to force it with "qmake -t vclib -o libcgt.vcproj", when I open it in
    Visual Studio, the project name is still "libcgtd".
    Is there a way to force it to grab the default name (i.e. library.vcproj)?

    Thanks

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: Visual Studio Project Name

    Honestly, I don't understand the meaning of debug, release, debug_and_release options when visual studio project is generated. Visual Studio will build debug or release version depending on the one currently chosen in IDE and it doesn't care of those CONFIG options in the .pro file. If you want to specify different output name for debug and release, try the following.

    Qt Code:
    1. TEMPLATE = lib
    2. CONFIG += qt staticlib
    3.  
    4. Release:TARGET = library
    5. Debug:TARGET = libraryd
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Visual Studio Project Name

    First of all, thanks for your suggestion...unfortunatelly this one doesn't work!

Similar Threads

  1. use of QString in visual Studio Project
    By begineer in forum Qt Programming
    Replies: 1
    Last Post: 1st March 2012, 14:10
  2. Visual Studio Project file
    By fruzzo in forum Newbie
    Replies: 0
    Last Post: 3rd November 2011, 14:11
  3. Replies: 1
    Last Post: 12th April 2011, 15:48
  4. Replies: 3
    Last Post: 18th April 2007, 15:31
  5. Qt 4 and Visual Studio 2005 Add-in project
    By JSPoly in forum Qt Programming
    Replies: 10
    Last Post: 23rd January 2007, 22:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.