Page 1 of 1

C++ Builder 10.2 Android linking problem (vtable)

Posted: Wed 23 Aug 2017 14:17
by vladik
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

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

Posted: Mon 28 Aug 2017 15:17
by azyk
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 ... )

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

Posted: Mon 28 Aug 2017 18:30
by vladik
You are right, it works perfect!
Thank you very much.
Vada

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

Posted: Tue 29 Aug 2017 09:56
by ViktorV
Thank you for the interest in our products.
Please contact us if you have any questions about our products.