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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:11:07+00:00 2026-05-23T10:11:07+00:00

I ran into a very peculiar error using lupdate v4.7.2. I got the error

  • 0

I ran into a very peculiar error using lupdate v4.7.2. I got the error message

module/foo.cpp:6: Qualifying with unknown namespace/class ::foo

for a couple of classes in a project with about 50 classes. I boiled the problem down to a simple example:

src/project.pro:

QT       += core
TARGET = test
TEMPLATE = app

SOURCES += main.cpp \
           screen.cpp

HEADERS += screen.h

TRANSLATIONS += de.ts

src/module/foo.h:

namespace sp {
class foo {
    initWidgets();
};
} // namespace sp

src/module/foo.cpp:

#include <QString>
#include "module/foo.h"

namespace sp {
    foo::initWidgets() {
    QString bar = tr("bar");
}
} // namespace sp

main.cpp has an empty main function in it.

The code compiles (barring any copypasta mistakes I might have produced here), so the syntax is basically correct.

  • 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-23T10:11:08+00:00Added an answer on May 23, 2026 at 10:11 am

    The answer was that lupdate was unable to locate the header file foo.h while parsing foo.cpp. Extending the .pro file with the following line removed the issue:

    INCLUDEPATH += .
    

    However, what still bothers me a bit is that the compiler should have been unable to compile the code, but somehow, qmake added a -I. to the compiler options. That’s why I didn’t think of an include file issue earlier and spent a couple of hours puzzling this out. Does anyone know whether this is default behavior? Also: Why does lupdate not emit an appropriate error message?

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

Sidebar

Related Questions

I ran into very peculiar problem with BLOBs in Oracle. I'm using OracleXE 10g
I ran into a very vague error while doing some simple jQuery DOM manipulation.
I ran into an interesting (and very frustrating) issue with the equals() method today
I ran into a scenario where LINQ to SQL acts very strangely. I would
Ran into an Out of Stack Space error trying to serialize an ASP.Net AJAX
Recently I ran into a very strange issue: touching the screen of the iPhone
I have ran into a very strange issue with Google Maps in Chrome 5.0.375.99:
Ok, so I've ran into a very strange issue, directly connected with before blocks.
Implementing the very first scala example I ran into some problems probably tipical for
I've began working with asp.net mvc very recently and I've ran into a problem.

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.