[Qt-interest] Q_DECLARE_INTERFACE trouble when using from different library
Andreas Pakulat
apaku at gmx.de
Wed Mar 31 11:20:41 CEST 2010
On 31.03.10 07:54:51, Jaco Naude wrote:
> Hi all,
>
> I'm stuck with a problem on Q_DECLARE_INTERFACE. I have an interface
> class which is declared as an interface using Q_DECLARE_INTERFACE. I
> use the interface succesfully inside the library in which it is
> located. However when I link against the library and include the
> interface's header file, I get the following error:
>
> ../../ObjManagementLib/source/IContext.h:47: error: expected
> identifier before string constant
> ../../ObjManagementLib/source/IContext.h:47: error: expected ',' or
> '...' before string constant
> ../../ObjManagementLib/source/IContext.h:47: error: expected
> constructor, destructor, or type conversion before ';' token
>
> I know what the error is saying, but don't understand why it is
> happening. I've used the interface in a different library before and
> there I did not have this problem.
In such cases I usually run the compiler in pre-process-only mode so I can
see the actual result of evaluating the various macro's.
Andreas
--
You will triumph over your enemy.
More information about the Qt-interest-old
mailing list