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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:44:00+00:00 2026-05-30T12:44:00+00:00

I´ve got one project, where all my .h and .cpp files are included. This

  • 0

I´ve got one project, where all my .h and .cpp files are included. This project builds my application. Another project has all my unit tests in it, which require the same .h and .cpp files as the first project. So everytime I add a new file to my first project I have to add it to the second project too, which is why I tried to automate that step.
For this I tried to use the files(glob) function of qmake, which looks basically like this:

HEADERS += \
    someotherstuff.h \
    files(../Core/DriveProgramInterface/*.h) \
    files(../Core/DriveProgramWizard/*.h)

SOURCES += \
    someotherstuff.cpp \
    files(../Core/*.cpp) \
    files(../Core/DriveProgramInterface/*.cpp) \
    files(../Core/DriveProgramWizard/*.cpp)

So, while it works well with the headers it doesn´t work with the sources at all. When I try to compile I get the following error:

No rule to make target ‘files(../Core/DriveProgramWizard/.cpp), needed by ‘debug/.o’. Stop

So I looked at my MakeFile and I´ve found this:

  SOURCES       = \
        someotherstuff.cpp \
        files(..\Core\*.cpp) \
        files(..\Core\DriveProgramInterface\*.cpp) \
        files(..\Core\DriveProgramWizard\*.cpp) \

  OBJECTS       = \
        someotherstuff.cpp \
        debug/*.o \
        debug/*.o \
        debug/*.o \

So I´m thinking, maybe the problem is, that the glob isn´t resolved in the MakeFile, but instead it tries to generate *.o files. I´m really not the least bit sure, if that is right, so if there´s some other reason why this doesn´t work, feel free to point me to it.
Also, if you´ve got any suggestions how I could make this work (with the files() function or without, I don´t care), I´d be very grateful.

  • 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-30T12:44:02+00:00Added an answer on May 30, 2026 at 12:44 pm

    I found out recently that qmake expands simple expressions like *.cpp automatically, without needing any specially globbing functions.

    So I would suggest changing your SOURCES line to this:

    SOURCES += someotherstuff.cpp
    SOURCES += ../Core/*.cpp
    SOURCES += ../Core/DriveProgramInterface/*.cpp
    SOURCES += ../Core/DriveProgramWizard/*.cpp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a Setup & Deployment Project in VS2005. One of the files that
We've got several Flex projects, one of which has just been refactored. I'm wondering
I´m having some trouble deciding in which way to go... I've got this application
I've got a project with Maven in which one subproject (A) wants to depend
I've got a Django project that has multiple settings files (www site, mobile site,
I'm developing one web application project using java for education industry.In this Admin have
I've got several projects in Eclipse (all are Maven projects) and one main project
I've got two projects in WPF and one project is the main one and
I've got two projects, one CF2.0 project and one NET2.0 project. These projects are
I've got a project coming up that will involve connecting to one to many

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.