-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0
-
None
-
f3f4e93f482c1ff579cb78cc1765a6930de3d766
dumpcpp uses "-n" option value for guard macros in headers which is wrong because that implies that every QtAx COM wrapper must have a unique namespace so that one cpp file could include several headers at same time. File names should be used for include guards.
My paritcular case is using OPOS device drivers which are located in its own file by device type plus one common file with constants, like this:
Opos_Constants.dll OPOSPointCardRW.ocx OPOSPOSKeyboard.ocx OPOSPOSPower.ocx OPOSPOSPrinter.ocx OPOSRFIDScanner.ocx ...
It's natural that they all should get in the same C++ namespace and at least two files (constants and any other driver) are included simultaneously.
I use these commands:
dumpcpp OPOS\CommonCO\OPOSBelt.ocx -n OPOS -o OPOS\QtWrappers\Belt dumpcpp OPOS\CommonCO\OPOSBillAcceptor.ocx -n OPOS -o OPOS\QtWrappers\BillAcceptor dumpcpp OPOS\CommonCO\OPOSBillDispenser.ocx -n OPOS -o OPOS\QtWrappers\BillDispenser
and every header has this:
/**************************************************************************** ** ** Namespace OPOS generated by dumpcpp from type library ** OPOS\CommonCO\OPOSBelt.ocx ** ****************************************************************************/ #ifndef QAX_DUMPCPP_OPOS_H #define QAX_DUMPCPP_OPOS_H ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wrong