Qt4-preview-feedback Archive, January 2007
Compile errors when including qslider.h
Message 1 in thread
Hi
I keep getting a compile errors when including qslider.h. I use
Qt-4.2.2, g++ 4.1.1 20060525 on a fedora core 5 box. This is the compile
error:
qslider.h:56: error: expected identifier before numeric constant
qslider.h:56: error: expected `}' before numeric constant
qslider.h:56: error: expected unqualified-id before numeric constant
.
.
.
The list goes on..
I have used the qt3to4 tool on my source code and header files, and I am
compiling with the -DQT3_SUPPORT flag. What can cause these compile errors?
Hope someone can help me with this :)
---
Best regards,
Martin Lilleeng Sætra
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 2 in thread
"Martin Lilleeng Sætra" <martin.l.satra@xxxxxx> wrote in message
news:45B8F1E7.6090204@xxxxxxxxx
> Hi
>
> I keep getting a compile errors when including qslider.h. I use
> Qt-4.2.2, g++ 4.1.1 20060525 on a fedora core 5 box. This is the compile
> error:
> qslider.h:56: error: expected identifier before numeric constant
> qslider.h:56: error: expected `}' before numeric constant
> qslider.h:56: error: expected unqualified-id before numeric constant
> .
> .
> .
> The list goes on..
>
> I have used the qt3to4 tool on my source code and header files, and I am
> compiling with the -DQT3_SUPPORT flag. What can cause these compile
> errors?
>
> Hope someone can help me with this :)
You probably include another header before qslider.h, and that other
header probably #define's a symbol that is used as an enum name in Qt.
Make sure you #include Qt headers first, and/or #undef symbols that
pollute the namespace.
Volker
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 3 in thread
Edit qslider.h, add the following code after QT_BEGIN_HEADER:
#ifdef Below
#define Below whodunit
#endif
#ifdef TicksBelow
#define TicksBelow whodunit
#endif
Your compiler will tell you what header you have included has a #define which is confusing your build.
> -----Original Message-----
> From: Martin Lilleeng Sætra [mailto:martin.l.satra@xxxxxx]
> Sent: Thursday, January 25, 2007 10:08 AM
> To: qt4-preview-feedback@xxxxxxxxxxxxx
> Subject: Compile errors when including qslider.h
>
> Hi
>
> I keep getting a compile errors when including qslider.h. I
> use Qt-4.2.2, g++ 4.1.1 20060525 on a fedora core 5 box. This
> is the compile
> error:
> qslider.h:56: error: expected identifier before numeric constant
> qslider.h:56: error: expected `}' before numeric constant
> qslider.h:56: error: expected unqualified-id before numeric constant .
> .
> .
> The list goes on..
>
> I have used the qt3to4 tool on my source code and header
> files, and I am compiling with the -DQT3_SUPPORT flag. What
> can cause these compile errors?
>
> Hope someone can help me with this :)
>
>
> ---
> Best regards,
> Martin Lilleeng Sætra
>
> To unsubscribe - send "unsubscribe" in the subject to
> qt4-preview-feedback-request@xxxxxxxxxxxxx
>
>
-----------------------------------------------------------------------
DISCLAIMER: Information contained in this message and/or attachment(s) may contain confidential information of Zetec, Inc. If you have received this transmission in error, please notify the sender by return email.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
-----------------------------------------------------------------------
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx