Qt: Objective-C header gets compiled as c++-header
<p>I'm currently trying to implement the PIMPL-Idiom to encapsulate Objective-C functionality in a C++ class in <strong>Qt</strong>. My pro file looks as it follows:</p>

<pre><code>QT += core gui
TARGET = testProject
TEMPLATE = app
SOURCES += main.cpp Helper.cpp
HEADERS += HelperInterface.h Helper.h

OBJECTIVE_SOURCES += ObjCHelper.mm
OBJECTIVE_HEADERS += ObjCHelper.h
</code></pre>

<p>The <code>ObjCHelper.h</code> is the objective-C header </p>

<pre><code>#import "HelperInterface.h"

@interface ObjCHelper : NSObject { int someVar }
- (int) doSomething():(void *)param;
@end
</code></pre>

<p>The <code>ObjCHelper.mm</code></p>

<pre><code>#import "ObjCHelper.h"

@implementation ObjCHelper
MyClassImpl::MyClassImpl() : self(NULL) { }
MyClassImpl::~MyClassImpl() {
    [(id)self dealloc];
}
void MyClassImpl::init()
{
    self = [[ObjCHelper alloc] init];
}
//...
@end
</code></pre>

<p>The class MyClassImpl is defined in HelperInterface.</p>

<hr>

<p>When i try to compile this project i receive the following errors:</p>

<pre><code>cannot find interface declaration for 'NSObject', superclass of 'ObjCHelper'
@interface ObjCHelper : NSObject
~~~~~~~~~~~~~~~~~~~~~   ^
</code></pre>

<p>It seems to me like Qt is treating the Objective-C header file <code>ObjCHelper.h</code> as a normal c++ header file! Why is that so?</p>

<p>The header file <code>ObjCHelper.h</code> isn't included anywhere else than in <code>ObjCHelper.mm</code></p>