Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ AdFax.hpp E2109 Not an allowed type #34

Open
dan27125 opened this issue Feb 26, 2023 · 3 comments
Open

C++ AdFax.hpp E2109 Not an allowed type #34

dan27125 opened this issue Feb 26, 2023 · 3 comments

Comments

@dan27125
Copy link

dan27125 commented Feb 26, 2023

+++++++++++++++++++++++++++++++++++++++++++++FIX C++ compiler error E2109 Not an allowed type in AdFax.hpp.
++++++++++++++++++++++++++++++++++++++++++++++

I'm a C/C++ programmer with very little Delphi Pascal experience. I have a high volume outbound Fax Server APP that was built 20 years ago using C++ Builder 6 and a AsyncPro. I recently got the app to compile and run OK using C++Builder/Rad studio version 10.3 Tokyo. However, when using C++ Builder to compile my fax outbound fax app I was getting compiler error E2109 Not an allowed type in a number of places within AdFax.hpp. The HPP files are generated when you build the C++ package. For some reason when the package is compiled "__published:" on some items is a problem when the HPP files are created.

For troubleshooting I can manually edit AdFax.hpp, change "__published:" to public: in about 6 changes one line changes to a number the C++ classes similar to this.... The app compiles and runs OK with 10.2 Tokyo. But under 11.x Alexandria it crashes. I'm a C/C++ programmer with very little Delphi Pascal experience. From what I've read about Delphi Published vs Public, the latter, public omits run time type information. I suspect the edit to AdFax.hpp changing from publish to public is not a safe valid fix because its changing intended run time type information

Could you help me figure out how to fix the Delphi / Pascal code ?

Searching online I found something similar error from almost 20 years ago

https://sourceforge.net/p/tpapro/discussion/241882/thread/823a8ad8/

Here is an example of the changes one line changes to a number the C++ classes similar to this....

class PASCALIMPLEMENTATION TApdReceiveFax : public TApdCustomReceiveFax
{
typedef TApdCustomReceiveFax inherited;
__published:

public: // DGA change to public to fix C++ E2109 Not an allowed type

__property AnswerOnRing = {default=1};
__property FaxAndData = {default=0};
__property FaxNameMode = {default=1};
__property OneFax = {default=0};
__property ConstantStatus = {default=0};
__property DestinationDir = {default=0};
__property OnFaxAccept;
__property OnFaxName;

public:
/* TApdCustomReceiveFax.Create / inline __fastcall virtual TApdReceiveFax(System::Classes::TComponent AOwner) : TApdCustomReceiveFax(AOwner) { }
/* TApdCustomReceiveFax.Destroy */ inline __fastcall virtual ~TApdReceiveFax(void) { }

};

@romankassebaum
Copy link
Contributor

Here it is the same, please contact David Millington.

@dan27125
Copy link
Author

dan27125 commented Mar 2, 2023 via email

@romankassebaum
Copy link
Contributor

I explained everything here: #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants