[Qt-interest] C code in QT use queue in Class
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Tue Aug 4 18:46:38 CEST 2009
While this has nothing to do with QT... Here are some hints I have used
Rather than including it directly, create a wrapper header which
includes somethings like this
<cheader>
------
#ifndef __header
#define __header
#define class _Class
Extern "C"
{
#include <header.h>
}
#endif
In that #define area, you can fix any issue...
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Pavel Koshevoy
Sent: Tuesday, August 04, 2009 9:31 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] C code in QT use queue in Class
Andreas Pakulat wrote:
> On 04.08.09 09:08:29, Pavel Koshevoy wrote:
>
>> You should be able to use any C code with C++ (nothing to do with Qt
>> really).
>>
>
> Actually thats wrong, there are few subtle differences between C and
C++
> that make it possible to write C code that doesn't compile with a C++
> compiler.
>
> Andreas
>
>
Such as using the class keyword in C code -- I've seen that before. As
I said, if you can't include the C header in a C++ file for some strange
reason -- write a thin wrapper to hide the offending code. You will
still be able to link against the C library.
Pavel.
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list