Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/RTL/C++/RTTI    [ Add a report in this area ]  
Report #:  126329   Status: Reported
[Android] TypeData.IntfFlags is invalid when trying to combine C++ and Delphi
Project:  C++Builder Build #:  20.0.16277.1276
Version:    20.1 Submitted By:   Jan Rames
Report Type:  Minor failure / Design problem Date Reported:  7/23/2014 12:39:18 AM
Severity:    Infrequently encountered problem Last Updated: 8/5/2014 5:48:38 AM
Platform:    mobile OS Internal Tracking #:  
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: None
I was trying to combine Delphi package and C++ main application on mobile.
But, TypeData for my interfaces does not contain ifHasGuid in IntfFlags (actually it is zero), but the interface does have a GUID, this GUID in the TypeData itself matches the one I can see on my interface.
Steps to Reproduce:
1. Create C++ FireMonkey mobile application
2. Create Delphi package
3. Add some interfaces to one of the units in the package (with GUID)
4. Retreive TypeData for these interfaces, IntfFlags is zero

Tomohiro Takahashi at 7/23/2014 7:26:10 PM -
Could you please attach sample projects(application and package) to reproduce/confirm your issue?

Jan Rames at 7/25/2014 5:37:11 AM -
Win32 works OK (console and FMX) I just cannot link it in single executable (as reported in QC126328).

Win64 produces an error: [ilink64 Error] Fatal: Error detected (PDA453)

I'm unable to test on iOS or MacOS.

I could try this with latest beta, but I'm not sure how to post results here under NDA...

Jan Rames at 7/24/2014 12:39:32 AM -
I attached the project group I've been using to test the combination of Delphi and C++ combined. The project is more complex since I wanted to try to use Spring4D that could hold C++ implementations of my interfaces that I wanted to call from Delphi. In order to compile the project, you'll need to fetch Spring4D sources ( and pull the weakreference-wip branch (commit 4c2f170) and then apply the attached patach to make it work on mobile and C++. You'll also need to define SPRING_DIR environmental variable and point it to base directory of Spring.

This is another issue, I've been able to complete spring registration by removing the ifHasGuid (just search Spring sources and comment it out it's on just 3 places I think) constraint check done by Spring. But then I got an AV after trying to Resolve IService1 interface (in DelphiUnit.RunApp not that no C code is run here but i could be a RTTI problem which forces the RTL to think its dealing with different type than it actually does). CopyInts gets called but the result should be an interface and thus CopyIntf should be called instead. The returned object is of type TDelphiInterface<IService1> which would apply to C++ but not Delphi. Should I create a separate QC?

If you need a simpler project (without Spring) I may try to create one, but I'd like to be able to use Spring for C++ in the next RAD Studio release.

Please note that this sources can be sued to reproduce the EXTDEF issue I added in a QC#126328.

Tomohiro Takahashi at 7/25/2014 4:34:13 AM -
Does your issue occur only with Android applicaton project(s)?
What about Win32/Win64/Mac/iOS?

Jan Rames at 8/5/2014 12:45:57 AM -
I previously made a mistake and commented to the previous thread, I hope the feedback I provided there will be sufficient.

Server Response from: ETNACODE01