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

  • Home
  • SEARCH
  • 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 6023661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:02:17+00:00 2026-05-23T04:02:17+00:00

I have an exe that depends on multiple static libs and in visual studio,

  • 0

I have an exe that depends on multiple static libs and in visual studio, they are all managed as part of 1 sln file and the exe has dependencies on the static libs.

How can this be set up in Qt Creator? Seems like there are 2 options:
1. create multiple projects in a Qt Creator “session”. But a session is not shared among users, right? so i’m not sure how that would work? For example, is there a session file that gets created?
2. use subprojects. and make the static lib sub projs of the exe?

Any recommendations? I’m totally new to Qt Creator and need to use it for a linux port.

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-23T04:02:18+00:00Added an answer on May 23, 2026 at 4:02 am

    To get qmake to produce a nice .sln with subprojects, make one main .pro file with the subdirs template, and set the necessary dependencies of each project on another.

    QtCreator uses qmake behind the scenes to generate a makefile and build from that, but you can also produce VS solution files by running

    qmake ../path/to/source -tp vc
    

    You can also use the Qt Visual Studio add-in to GUI-ify the process.


    Also: to make sure the executable is relinked each time a dependant static lib is changed, use

    CONFIG( debug, debug|release ) {
        LIBSUFFIX = d
        win32:LIBS += -L../staticlib1/debug
        win32:PRE_TARGETDEPS += ../staticlib1/debug/libAmbrosiad.a
    } else {
        LIBSUFFIX =
        win32:LIBS += -L../staticlib1/release
        win32:PRE_TARGETDEPS += ../staticlib1/release/libAmbrosia.a
    }
    unix:LIBS += -L ../libAmbrosia
    unix:PRE_TARGETDEPS += ../libAmbrosia/libAmbrosia$${LIBSUFFIX}.a
    

    Place something like this in your executable’s .pro file, with the note that the LIBSUFFIX part is completely optional, but in line with how Qt itself is built, so that’s what I use too. Mind the “release” and “debug” subdirectories absent on Linux/Mac builds. And to be complete: the rather verbose if-else condition is The Right Way (TM) to differentiate debug from release builds in qmake project files. Simpler ways may break under several circumstances.

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

Sidebar

Related Questions

I have an exe that I know was written in java. I understand that
I have a .exe and many plug-in .dll modules that the .exe loads. (I
I have a loader.exe with Main() that loads the 'UI' in WPF, the thing
I have a program that runs osql.exe from microsoft sql server tools directory and
I have C# winforms application that needs to start an external exe from time
I have some Python code that works correctly when I use python.exe to run
I have a WiX project that installs a few EXE files. One is the
I have an external Windows .exe that is actually Java application: Running the .exe
I have an exe that has been wrapped using this method: http://www.kocjan.org/tclmentor/10-tclkits-building-standalone-tcl-binaries.html Is there
I have an application (exe) that uses some strongly named dll's. If I understand

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.