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 8358859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:56:32+00:00 2026-06-09T10:56:32+00:00

I have a Qt subdirs project with the following structure: ExternalQtProject QtSubdirProjects – GUI

  • 0

I have a Qt subdirs project with the following structure:

ExternalQtProject 
QtSubdirProjects
  - GUI
  - WebService

WebService contains LIBS from the external Qt project (.pro file in WebService)

LIBS += -L<path to ExternalQtProject>
LIBS += <some ExternalQtProject .obj files>

GUI uses the web service (.pro file in GUI):

LIBS += -L<path to WebService>
LIBS += <WebService .obj files>

So basically GUI is using one header file from WebService, which in turn uses several header files from ExternalQtProject.

Problem: I get linker issues until I include the LIBS entries from WebService as well in GUI, so GUI ends up with all LIBS from the ExternalQtProject:

LIBS += -L<path to ExternalQtProject> # I want to avoid redefinition of this
LIBS += <some ExternalQtProject .obj files>  # I want to avoid redefinition of this
LIBS += -L<path to WebService>
LIBS += <WebService .obj files>

Since there is a clear dependency (GUI->WebService->ExternalQtProject), is there a way to avoid this redefinition of LIBS for the GUI sub project?

— Edit 1 —

How to use QMake's subdirs template? helps me to better structure my project, but not yet avoiding the duplication of LIBS

  • 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-06-09T10:56:34+00:00Added an answer on June 9, 2026 at 10:56 am

    Qmake .pro files can use variables and include other files.

    You can e.g. use SOMELIST=foo.obj bar.obj and LIBS += $$SOMELIST when needed.

    A SUBDIRS template is used to list different .pro files, each typically responsible for building one binary or one library.

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

Sidebar

Related Questions

I have the following directory structure for my GAE project: project: library: lib1.py lib2/x.py
I have a zip file which contains the following directory structure: dir1\dir2\dir3a dir1\dir2\dir3b I'm
I have a subdirs project which wraps a couple libraries and a main application.
If I have a SVN project set up like so: Project -- Subdirs --
I have the following maven-setup: parent-project |- libraries |- utilities |- core |- component1
I have the following *.pro files : the one which heads the solution #
I have a c++ project which directory structure like below: server/ code/ BASE/ Thread/
have a nice day. I got problem when trying to create an image from
I am very close to finishing this project however I have a problem that
I have an directory, which has a lot of subdirectories. those subdirs sometimes even

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.