Qt-interest Archive, May 2007
Qt\4.3.0\bin\dumpcpp duplicates forward declarations, why?
Message 1 in thread
wrapperax is one of the Qt examples at
C:\Qt\4.3.0\examples\activeqt\wrapper
You may have it registered at the moment when you install Qt. if not
just type
idc wrapper.dll /regserver
in dir: C:\Qt\4.3.0\examples\activeqt\wrapper\release
Then, type
C:\Qt\4.3.0\bin\dumpcpp {3B756301-0075-4E40-8BE8-5A81DE2426B7}
wrapperaxlib.h and cpp will be generated.
Then, I included the classes in my project and compile. I got a lot of
errors.
I open wrapperaxlib.h and found “forward declarations” section was
duplicated and soothing like “struct QRect;” shouldn’t be there.
// forward declarations
struct QRect;
struct QSize;
struct QPoint;
enum MousePointer;
enum FocusPolicy;
enum ToolButtonPopupMode;
struct QRect;
struct QSize;
struct QPoint;
enum MousePointer;
enum FocusPolicy;
enum ToolButtonPopupMode;
Do you have this problem?
Thanks for your test,
Lingfa
--
[ signature omitted ]
Message 2 in thread
"Lingfa Yang" <lingfa@xxxxxxx> wrote in message
news:4641FFE4.5000500@xxxxxxxxxx
> wrapperax is one of the Qt examples at
> C:\Qt\4.3.0\examples\activeqt\wrapper
> You may have it registered at the moment when you install Qt. if not
> just type
> idc wrapper.dll /regserver
> in dir: C:\Qt\4.3.0\examples\activeqt\wrapper\release
>
> Then, type
> C:\Qt\4.3.0\bin\dumpcpp {3B756301-0075-4E40-8BE8-5A81DE2426B7}
> wrapperaxlib.h and cpp will be generated.
>
> Then, I included the classes in my project and compile. I got a lot of
> errors.
>
> I open wrapperaxlib.h and found ?forward declarations? section was
> duplicated and soothing like ?struct QRect;? shouldn?t be there.
>
> // forward declarations
> struct QRect;
> struct QSize;
> struct QPoint;
> enum MousePointer;
> enum FocusPolicy;
> enum ToolButtonPopupMode;
> struct QRect;
> struct QSize;
> struct QPoint;
> enum MousePointer;
> enum FocusPolicy;
> enum ToolButtonPopupMode;
>
> Do you have this problem?
>
> Thanks for your test,
>
> Lingfa
Don't use dumpcpp for QAxServer servers.
QAxServer needs to generate IDL for those types, otherwise the type
library is incomplete. dumpcpp sees only the IDL, and will generate C++
from it. Both do the right thing.
Just use your C++ classes in your C++ code.
Volker
--
[ signature omitted ]