Recent

Author Topic: [Solved] Help needed compiling  (Read 1652 times)

broutelichen

  • Newbie
  • Posts: 6
[Solved] Help needed compiling
« on: February 12, 2026, 01:49:45 pm »
hello all,
i'm trying to compile from my windows PC a project.
the deve says to use "FPC 3.3.1"
but i can't find this version on sourceforce.
there is only the 3.2.2...
i also tried to compile with those versions, but there is an issue when trying to compile to a windows exe :

here is the error line in the code:
case Integer(LUnicode.Words[0]) of

translator.pas error illegal qalifier

so, could someone tell me where to find the good windows Lazarus with FPC 3.3.1 or, help me compiling this project  ?
thanks so much
https://github.com/coffeegreg/YTuner


« Last Edit: February 15, 2026, 01:52:19 pm by broutelichen »

Roland57

  • Hero Member
  • *****
  • Posts: 586
    • msegui.net
Re: Help needed compiling
« Reply #1 on: February 12, 2026, 02:11:14 pm »
Hello. One possibility is to install Lazarus with fpcupdeluxe, and choose "trunk" branch.
My projects are on Codeberg.

CM630

  • Hero Member
  • *****
  • Posts: 1641
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Help needed compiling
« Reply #2 on: February 12, 2026, 02:12:16 pm »
I guess that you could replace

case Integer(LUnicode.Words[0]) of
with

case Integer(Words and $0000FFFF) of (or maybe but less likely case Integer(Words and $FFFF0000) of)

But try fpcupdeluxe first, maybe you wil find a way to make it work. I would rather advice you to start from here: https://wiki.lazarus.freepascal.org/fpcupdeluxe
« Last Edit: February 12, 2026, 02:16:38 pm by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

Zvoni

  • Hero Member
  • *****
  • Posts: 3303
Re: Help needed compiling
« Reply #3 on: February 12, 2026, 03:27:49 pm »
The issue has nothing to do with trunk vs. stable

Spot the mistake......
Code: Pascal  [Select][+][-]
  1. function ReplaceDiacritics(const AUTF8String: string; ATranslatorIdx: integer): string;
  2. var
  3.   LPointer: PChar;
  4.  LUnicode: Cardinal;
  5.   LCPLen: integer;
  6.   LIdx: integer;
  7. begin
  8.   Result:='';
  9.   LPointer:=PChar(AUTF8String);
  10.   LIdx:=0;
  11.   try
  12.     repeat
  13.       LUnicode:=UTF8CodepointToUnicode(LPointer,LCPLen);
  14.       if LCPLen=2 then
  15.         with AVRConfigArray[ATranslatorIdx].Translator do
  16.           case Integer(LUnicode.Words[0]) of  //<--- Line that errors out....
  17. //*snip*
  18.  
« Last Edit: February 12, 2026, 03:30:48 pm by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

broutelichen

  • Newbie
  • Posts: 6
Re: Help needed compiling
« Reply #4 on: February 12, 2026, 03:46:10 pm »
thank you all for your answers and advices. i tried to use fpcupdeluxe with 3.3.1 and truck but... i can't manage to compile, i'm so a noob :(
Zvoni, what do you suggest about the code you've posted ?
something is missing ?

i'm so sorry to ask you help

Zvoni

  • Hero Member
  • *****
  • Posts: 3303
Re: Help needed compiling
« Reply #5 on: February 12, 2026, 03:50:18 pm »
thank you all for your answers and advices. i tried to use fpcupdeluxe with 3.3.1 and truck but... i can't manage to compile, i'm so a noob :(
Zvoni, what do you suggest about the code you've posted ?
something is missing ?

i'm so sorry to ask you help

Quote
    function ReplaceDiacritics(const AUTF8String: string; ATranslatorIdx: integer): string;
    var
      LPointer: PChar;
      LUnicode: Cardinal;
      LCPLen: integer;
      LIdx: integer;
    begin
      Result:='';
      LPointer:=PChar(AUTF8String);
      LIdx:=0;
      try
        repeat
          LUnicode:=UTF8CodepointToUnicode(LPointer,LCPLen);
          if LCPLen=2 then
            with AVRConfigArray[ATranslatorIdx].Translator do
              case Integer(LUnicode.Words[0]) of  //<--- Line that errors out....
    //*snip*
     
Since when is a "Cardinal" a record?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

broutelichen

  • Newbie
  • Posts: 6
Re: Help needed compiling
« Reply #6 on: February 12, 2026, 04:32:42 pm »
thank you to have took time to read an answer.
everything is under my knowledge, i just wanted to compile to windows .exe this project.
i wont't be able to correct the Dev's code.
that wasn't my goal.
thanks again
you can close this thread,sorry

CM630

  • Hero Member
  • *****
  • Posts: 1641
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Help needed compiling
« Reply #7 on: February 12, 2026, 05:05:34 pm »
Quote from: Zvoni
link=topic=73458.msg576136#msg576136 1date=1770907818]
   ...
          if LCPLen=2 then
            with AVRConfigArray[ATranslatorIdx].Translator do
              case Integer(LUnicode.Words[0]) of  //<--- Line that errors out....
Since when is a "Cardinal" a record?
Cardinal = uint32. I guess the idea is to get only half of its bytes.I have no idea if .word[0] will work this way on some later versions of fpc. But even with that fix, the compilation failed with no reasonable error message.
« Last Edit: February 12, 2026, 05:45:20 pm by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

n7800

  • Hero Member
  • *****
  • Posts: 650
  • Lazarus IDE contributor
    • GitLab profile
Re: Help needed compiling
« Reply #8 on: February 12, 2026, 06:19:01 pm »
I haven't checked, but I think these are type helpers. As far as I remember, additional ones for numbers were indeed added in the FPC trunk.
« Last Edit: February 12, 2026, 06:20:35 pm by n7800 »

n7800

  • Hero Member
  • *****
  • Posts: 650
  • Lazarus IDE contributor
    • GitLab profile
Re: Help needed compiling
« Reply #9 on: February 12, 2026, 06:36:20 pm »
so, could someone tell me where to find the good windows Lazarus with FPC 3.3.1 or, help me compiling this project  ?
thanks so much
https://github.com/coffeegreg/YTuner

By the way, the README of the project you linked to says to use the latest versions. This usually means the latest stable versions, not trunk. Otherwise, the README should be updated to clearly state this.

In any case, you can ask the developer about compiling on the project's bug tracker.

cdbc

  • Hero Member
  • *****
  • Posts: 2667
    • http://www.cdbc.dk
Re: Help needed compiling
« Reply #10 on: February 12, 2026, 07:13:41 pm »
Hi
I think you can swap this:
Code: Pascal  [Select][+][-]
  1. case Integer(LUnicode.Words[0]) of  
with this:
Code: Pascal  [Select][+][-]
  1. case Hi(LUnicode) of
  2. /// or is it
  3. case Lo(LUnicode) of
Just a thought, 'cause that will compile with 3.2.2
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

broutelichen

  • Newbie
  • Posts: 6
Re: Help needed compiling
« Reply #11 on: February 12, 2026, 09:26:43 pm »
i spend many hours installing differents version of FPC and Lazarus with fpcupdeluxe (windows version) but i can't get the win compiled file.
too difficult.
the Dev just leave a comment to a user:
on Apr 20, 2025
Use the latest FPC. I use FPC 3.3.1 and the code compiles fine without errors.

i tried with FPC 3.3.1 and latest or past versions of Lazarus... and still issues that i can't solve.
i give up
but thank you everyone who try to help me.

CM630

  • Hero Member
  • *****
  • Posts: 1641
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Help needed compiling
« Reply #12 on: February 12, 2026, 10:11:07 pm »
I received some SQL warnings, the last one was that some *sql*.zip was not found. And then an error "I do not known what is wrong, enable -gl”. I enabled -gl, still "I do not known what is wrong, enable -gl” (regular Lazarus 4.4, jst replaced the .word[0]). Could it be somthing related to SQL?
What is your OS? See here;
https://github.com/coffeegreg/YTuner/releases/tag/1.2.6
Quote
Abandoned: Support for M$ Windows. (Due to this "issue" #87 with false positives of Windows Defender and the VirusTotal "oracle" I removed all YTuner binaries for M$ Windows. Please don't ask me to add binaries for this garbage OS)
The bug description does not sound like "cannot compile in windows", anyway.
« Last Edit: February 12, 2026, 10:14:43 pm by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

jamie

  • Hero Member
  • *****
  • Posts: 7598
Re: Help needed compiling
« Reply #13 on: February 12, 2026, 11:59:40 pm »
Code: Pascal  [Select][+][-]
  1. case WOrd(LUnicode {.Words[0]}) of
  2.  
The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 7598
Re: Help needed compiling
« Reply #14 on: February 13, 2026, 12:50:12 am »
There is multiple issues.

Apparently, it uses Weblaz and it needs the version that comes with the FPC trunk because of missing properties in 3.2.2

As for the resources, yes, those are messed up and already unzipped in a SQL folder, the RC file needs correcting.

Etc
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018