C++ Builder 10.2 Android linking problem (vtable)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
vladik
Posts: 2
Joined: Wed 23 Aug 2017 14:02

C++ Builder 10.2 Android linking problem (vtable)

Post by vladik » Wed 23 Aug 2017 14:17

Hi,

I created a very simple test app with just two buttons to check how it runs on Android.
Everything worked well until the moment I added a component SQLServerUniProvider and UniConnection. I wanted to test if the Android app can access my SQL server.

I got linking error:
[ldandroid Error] C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidNDK-9c_19.0.27659.1188\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-ld.exe: .\Android\Debug\frm_Main.o: in function _ZTX8TfrmMain:frm_Main.cpp(.data.rel.ro+0x22e): error: undefined reference to 'vtable for Sqlserveruniprovider::TSQLServerUniProvider'

I normally work in Windows and have no experince in creating Android apps.
If someone has any idea how to solve the problem, I will be very thankful.

Regards,
Vlada

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: C++ Builder 10.2 Android linking problem (vtable)

Post by azyk » Mon 28 Aug 2017 15:17

This problem is due to the bug in C++Builder: http://qc.embarcadero.com/wc/qcmain.aspx?d=124893 . As a workaround, you can add two files for SQLServerUniProvider - libtdsprovider250.a and libmsprovider250.a ( located in 'Devart\UniDAC for RAD Studio 10.2\Lib\Android\' ) to the project (IDE Main Menu -> Project -> Ad To Project ... )

vladik
Posts: 2
Joined: Wed 23 Aug 2017 14:02

Re: C++ Builder 10.2 Android linking problem (vtable)

Post by vladik » Mon 28 Aug 2017 18:30

You are right, it works perfect!
Thank you very much.
Vada

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: C++ Builder 10.2 Android linking problem (vtable)

Post by ViktorV » Tue 29 Aug 2017 09:56

Thank you for the interest in our products.
Please contact us if you have any questions about our products.

Post Reply