Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 10

Qt-interest Archive, March 2002
problem with a Macro definition


Message 1 in thread

hey all,

I have a simple class defined in a .h file, with a .cpp file implementing
it, and I'm building this in VC6.

my header is...

#include <qtoolbar.h>

ToolBar : public QToolBar
{
	Q_OBJECT
   public:

	ToolBar();
	virtual ~ToolBar();
}

source...

#include "toolbar.h"

ToolBar::ToolBar() {}

ToolBar::~ToolBar() {}

this compiles fine. However, if I add an include of <qpixmap.h> to the
header file, I get an error during compile of

c:\qt\3.0.1evaluation\include\qrect.h(46) : fatal error C1189: #error :
"Macro definition of topLeft conflicts with QRect"

If I move the include to the cpp, there are no errors.

I'm at a complete loss as to what that error means. Here is the block in
qrect.h that's giving me th error...

#if defined(topLeft)
#error "Macro definition of topLeft conflicts with QRect"
// don't just silently undo people's defines: #undef topLeft
#endif

I don't have topLeft defined in my dsp, so i'm unsure how it is being
defined, or where.

Any help would be greatly appreciated.

Thanks,

Matt Harp
mharp@seapine.SPAMcom


Message 2 in thread

#include <qtoolbar.h>

               ToolBar : public QToolBar
^^^^^^^^^^^^ 
{
	Q_OBJECT
   public:

	ToolBar();
	virtual ~ToolBar();
}


... don't you want class ToolBar is that just a copy error?

--Kaleb


Message 3 in thread

yeah, just a copy error.

class ToolBar : public QToolBar


well, I just ran the moc on the file, and the cpp it generates also gives me
that error, when built in VC 6.

this is driving me nuts. and on a holiday of all time...

-matt

-----Original Message-----
From: owner-qt-interest@trolltech.com
[mailto:owner-qt-interest@trolltech.com]On Behalf Of Kaleb Pederson
Sent: Friday, March 29, 2002 12:37 PM
To: mharp@seapine.com; qt-interest@trolltech.com
Subject: RE: problem with a Macro definition


#include <qtoolbar.h>

               ToolBar : public QToolBar
^^^^^^^^^^^^
{
	Q_OBJECT
   public:

	ToolBar();
	virtual ~ToolBar();
}


... don't you want class ToolBar is that just a copy error?

--Kaleb

--
 [ signature omitted ]