Page 1 of 2

compile error when use TsiLang on FireMonkey

Posted: Wed Oct 15, 2014 8:52 pm
by wxz
hi,

I'm trying to go though the localization process using the FireMonkey sample projects - 'SettingsDemo'. After I drag and drop the TsiLang component in the form designer, it failed to compile with the error like:

[bcc32 Error] SettingsProjectForm.h(26): E2015 Ambiguity between 'Vcl::Forms::TForm' and 'Fmx::Forms::TForm'
Full parser context
SettingsProjectForm.cpp(15): #include SettingsProjectForm.h
SettingsProjectForm.h(25): class TSettingsForm

I found that the ambiguity was caused by siComp.h which includes Vcl.Forms.hpp etc. Are there any FireMonkey samples (C++ builder) for siComponent?

Posted: Thu Oct 16, 2014 12:49 pm
by isiticov
There are not .H files for C++Builder and FireMonkey in original delivery set. If you have access to Full Source edition you can just re-build your FireMonkey project under C++Builder (don't forget to activate FMX conditional define) by adding TsiLang sources unit to project's search path and such files will be created.

P.S. Due to occasunal error your password for forum was changed. We've to reset it and it is now "12345". Please change it on next login. Sorry for this.

details on rebuild with C++ Builder

Posted: Thu Oct 16, 2014 1:32 pm
by wxz
So, in short, there is no way that I can localize FireMonkey projects with trial version with C++ builder (XE7)? Is it possible that I use pre-compiled dcu files in C++ builder?

If I purchased the full source edition, I assume the source code is written in Delphi, and if I rebuild successfully, it will generate the c++ header files for my project right? Then in order to rebuild, should I add the TsiLang sources unit to search path for C++ compiler or Delphi compiler?

And after I successfully rebuild from the source code, there is nothing I need to change and the errors I mentioned in my first post will be resolved automatically, is that correct?

Thanks in advance.

Posted: Thu Oct 16, 2014 2:33 pm
by isiticov
Yes, with trial version you won't be able to test localization at run-time for FireMonkey C++Builder projects. We will try to improve our delivery and include the C++ header files for FireMonkey projects as well in future.
It is possible to use precompiled DCU files in C++Builder but without .H or .HPP files they are unusable.

Yes, if you add TsiLang source folder to project's search path and rebuild your project (please note to add FMX compiler conditional define!) it will generate .H files as well.

Yes, only generation of proper .H files is required.

Posted: Thu Oct 16, 2014 8:59 pm
by wxz
Thanks for the clarification.
I'm currently reviewing FireMonkey localization options. Since I cannot directly use trial version SiComponents for FireMonkey projects, can I assume that the workflow for localizing FireMonkey projects is the same as VCL projects? For example, is there a FireMonkey version TsiLang Expert? Does it support hard-code string searching?

If not, what are the functional limitations (besides the ones mentioned in Manual already) with regard to localizing FireMonkey?

Posted: Fri Oct 17, 2014 5:34 am
by isiticov
As you can test all the IDE's improvements available under FMX projects as well as VCL. There is no difference in localizing FMX and VCL projects except mentioned in manual.

Posted: Tue Oct 28, 2014 8:00 am
by isiticov
Version 7.3.1 (just published) includes .HPP files for C++Builder XE7 FireMonkey builds.

same problem....

Posted: Mon May 23, 2016 11:07 am
by bjespomotschnik
Hello Mr. Siticov,

I have the same problem and can't solve it. I have C++Builder 10.1 Berlin and the newest SiComponent suite with full source with FMX entry in conditions.

First it does not find siComp.h, so I added the path to it. I find a lot of .h and .hpp files with these vcl-references.

I have added the units directory to projects search path, but it does not translate new or at least does not write new .h or .hpp files. If I "delete" them by renaming, it tells me, "could not find siComp.h".

I have tried to add units directory to every search path I could find, but result is always the same.

What am I doing wrong?

(I am using a simple empty application only with one TsiLang in it.)

With kind regards

Fritsch

Posted: Tue May 24, 2016 4:09 am
by isiticov
Hello,

When compiling FMX application you need to include TsiLang sub-folder with respective target platform .H files. I mean under Android target platform please add FMX\Android sub-folder to include path, under iOS FMX\iOS and so on. FireMonkey .H files are placed under respective sub-folder. If you have Full Source edition and want to re-build TsiLang in your application you need to add FMX compiler conditional define in Project Options and add TsiLang units (such as sicomp.pas, siLngLnk.pas, MemIni.pas and siConsts.pas) to your project. Just to force their re-build when you building you C++Builder project. But the easier way would be to add FMX\{Platform} path to the target platform directives.

Posted: Tue May 24, 2016 10:38 am
by bjespomotschnik
Dear Mr. Siticov,

thank you for your fast reply.

I have understood your text, I think. The problem is, nowhere in my TsiLang folder I can find FMX-sub-folders of any kind. Am I searching them in the wrong position?

Of course I only installed C++Builder-IDE and ERS XE101. In TsiLang\units I have the folders Auxiliary, CBuilder 5, CBuilder 6, ERX XE101, Packages, TsiLangELPack and TsiLang_TNT. None of them contains any FMX-sub-folders, the folder TsiLang itself does not, too.

May it be necessary to install additional parts of the siComponent Suite?

Posted: Tue May 24, 2016 2:03 pm
by isiticov
Sorry, my fault. The files are just under \Units\ERS XE101\{PLATFORM} in your case. There is FMX sub folder only under Win32 and Win64 folders (in updated setup).

P.S. We've updated install script for Full Source edition since it didn't include FMX compiled files for Win32 and Win64. If you need to build FMX under these target platforms please re-download and re-install. Or you can always rebuild TsiLang sources for target platforms. Please see above for details.

Posted: Wed May 25, 2016 1:04 pm
by bjespomotschnik
Dear Mr. Siticov,

now I have installed newer version and the FMX-subfolders exist.

(I do not know, if I should open a new thread.)

I started with a multiplatform template "empty application" without any content and ran it. All was ok. Then I did not more than add one TsiLang. First again it told, it could not find siComp.h. This is ok, siComp.h does not exist. I changed to siComp.hpp and compilation worked fine.

The program ran, but on closing I got access violations. I could reproduce this behaviour with tabbedApp and others. After adding TsiLang they all make access violations on closure.

The curious thing is, these never again vanish. I can delete the TsiLang, delete the include entry for siComp.hpp, clean up and rebuild, delete all the sub-folders, which were created previously (Win32, _history, _recovery), the access violations on closure do not vanish again.

I have a newly downloaded siComponents Suite and a very new XE 10.1 Berlin.

Posted: Thu May 26, 2016 4:55 am
by isiticov
Just disable "Link with run-time packages" option in project options. As this forces to load TsiLang run-time package at run-time and it is VCL not FMX.

Posted: Mon Jun 20, 2016 12:29 pm
by bjespomotschnik
Hello,

I don't get it to work. The previous described error I had not with Win64, so I used this til now. But the problem stays....

Simple example:

I make a multiplatform empty application.

I put a combobox on it. It does work fine with empty combobox and with entries. I put a TsiLang on the form. Now I get an access violation on closing the program. With Win64 I get this only, if entries in the combobox, with Win32 I get it always.

Previously I have told the options not to link with run-time packages, or at least I think, I have.

I have set to false "link with run-time packages" for all platforms under packages->runtime-packages and additionally tried disable "link with dynamic rtl" under C++-Linker but all was of no help, I only succeeded sometimes in preventing the win32 from linking at all.

very slowly I get the suspicion, I will not bring it to work, Android and iOS I did not even try..... but localization is very important for this project.

Posted: Tue Jun 21, 2016 7:41 am
by isiticov
Hello,

At http://www.sicomponents.com/soft/TsiLang_FMX_CPP.zip you can download sample project with combo-boxes and TsiLang that builds and runs just fine. Please check the notes in README.TXT file inside ZIP.
Please let us know if this worked for you.