Page 1 of 1

Win64 modern - Link error

Posted: Mon Nov 11, 2024 8:24 am
by jcanom
Hi, I'm trying to compile in 64 bits modern in Athens 12.2 and the linker doesn't find these files :

(link runtime packages off)
- siInternetTranslator_12r.lib
- TsiLang12r.lib

(link runtime packages on)
- siComp.o

Any clue?

Re: Win64 modern - Link error

Posted: Mon Nov 11, 2024 8:26 am
by jcanom
By the way, I've installed 7.9.7 versión and these lib files aren't located under : \TsiLang\Units\ERS 12\Win64x\

Re: Win64 modern - Link error

Posted: Mon Nov 11, 2024 8:31 am
by isiticov
Hello,

Sorry for this. We've just updated the setup packages on the web site. Please re-download, it should be working now.

Re: Win64 modern - Link error

Posted: Mon Nov 11, 2024 10:06 am
by jcanom
Hi, I tried last package, now finds lib files but still get this error:

[ld.lld Error] ld.lld: error: Could not locate the file 'siComp.o'

Thanks.

Re: Win64 modern - Link error

Posted: Mon Nov 11, 2024 1:40 pm
by isiticov
Sorry for this. Updated again the setup on the web site. Now it includes .O files as well.
Please note: we were able to link the Win64x project only by disabling run-time packages option and removing reference to the TsiLang12_r.lib file. Forcing the linker to use only .O files. Otherwise, linker complained about duplicate declarations (so it used the declarations both from .LIB and .O files).
Thank you again for reporting this!

Re: Win64 modern - Link error

Posted: Mon Nov 11, 2024 4:54 pm
by jcanom
Hi again,

I don't fully follow you, What you mean with removing references to TsiLang12_r.lib?

I removed run-time package options and removed all references to tsilang12_r.lib, siInternetTranslator_12r.lib from .cbprog.

And as you said I get this duplication symbols errors: (attached pic)

[ld.lld Error] ld.lld: error: duplicate symbol: __init_record_Sicomp
[ld.lld Error] ld.lld: error: duplicate symbol: __init_record_Siinternettranslate
[ld.lld Error] ld.lld: error: duplicate symbol: __init_record_Siconsts
[ld.lld Error] ld.lld: error: duplicate symbol: __init_record_Memini
[ld.lld Error] ld.lld: error: duplicate symbol: __ptr.__init_record_Siconsts
[ld.lld Error] ld.lld: error: duplicate symbol: __ptr.__init_record_Siinternettranslate
[ld.lld Error] ld.lld: error: duplicate symbol: __ptr.__init_record_Memini
[ld.lld Error] ld.lld: error: duplicate symbol: __ptr.__init_record_Sicomp

Where do I have to remove the lib references from? I missed something for sure...

By the way, thanks to you for your quick responses ;-)

Re: Win64 modern - Link error

Posted: Tue Nov 12, 2024 7:08 am
by isiticov
Hello,
New build is published on the web site. Please re-download. Now everything should work, the ONLY thing is: it is required to manually add TsiLang_12r.lib (from Win64x) to the Win64 modern project. Otherwise, the linker won't link properly.

Re: Win64 modern - Link error

Posted: Tue Nov 12, 2024 9:31 am
by jcanom
As you said, I added lib to project from win64x and now I get this. (see attached pic)

Re: Win64 modern - Link error

Posted: Tue Nov 12, 2024 12:18 pm
by isiticov
Sorry for all these troubles. We're disappointed as well with this functionality. :(
So far, the only (like 100%) working sequence (for Win64 Modern) is:
1. Create a new project.
2. In the project settings:
2.1 Use of run-time packages is disabled.
2.2 In the settings Building | Delphi Compiler | Output - C/C++ in the fields for outputting HPP and OBJ, .\$(Platform)\$(Config) is set (or the path for this project where to output, the main thing is that it is in the same place where the main output is).
3. Add to the project .PAS files from the TsiLang folder (C:\Program Files (x86)\SiComponents\TsiLang\Units): siComp.pas, MemIni.pas, siConst.pas, siLangLnk.pas (others, if asked, depending on which TsiLang component is used in the project).
4. Also add both .PAS files from the folder C:\Program Files (x86)\SiComponents\TsiLang\Units\siInternetTranslator.

After that, the project builds and links normally. Checked with the release available on the site.
We will continue to try to "overcome" this.
Our suspicion is that the Delphi compiler for CLANG (Win64x) builds a .LIB file with links to .OBJ, and the C++ CLANG linker, like other non-Win32 ones, "expects" .O files in the .LIB.

Re: Win64 modern - Link error

Posted: Tue Nov 12, 2024 3:09 pm
by jcanom
I've just downloaded installer and there isn't any .pas files on C:\Program Files (x86)\SiComponents\TsiLang\Units folder.

Please, update installer and I'll try again.

Thanks.

Re: Win64 modern - Link error

Posted: Wed Nov 13, 2024 6:10 am
by isiticov
Hello,
New build is just published and it finally looks like the problem is resolved.
Few things to mention for using TsiLang components with Win64 modern target platform:
1. Use of run-time packages shall be disabled in project options.
2. When IDE will ask for the .LIB files shall be selected "Remove this reference" option:
Select "Remove this reference" option
Select "Remove this reference" option
2024-11-13_09-36-55.png (11.68 KiB) Viewed 84626 times
Select "Remove this reference" option
Select "Remove this reference" option
2024-11-13_09-37-25.png (11.98 KiB) Viewed 84626 times

Hope it is the final. :) Thank you again for your help with this!

Re: Win64 modern - Link error

Posted: Wed Nov 13, 2024 8:10 am
by jcanom
Great! Yes, now it works with your instructions.

Your components have been helping me last 10 years, no need to thank me for helping you once in a while ;-)
Your support has been first quality always I have needed.

Thanks to you man!

Re: Win64 modern - Link error

Posted: Wed Nov 13, 2024 3:27 pm
by isiticov
Finally, the problem was detected and resolved completely. Please re-download and it shall work without any other actions, just as always.