<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      秋·風

        博客園 :: 首頁 :: 博問 :: 閃存 :: 新隨筆 :: 聯系 :: 訂閱 訂閱 :: 管理 ::
      修復lazarus/fpc在windows不支持中文目錄的問題(2025-09-22更新) - 秋·風 - 博客園》后已支持中文目錄,但交叉編譯時出錯以下錯誤信息:

      QQ_1758889013347

      1、寫linkxxxx.res時cross目錄缺少雙引號:
      fpcsrc\compiler\systems\t_linux.pas這個 Function TLinkerLinux.WriteResponseFile(isdll:boolean) : Boolean;
      QQ_1758893731951
      將WriteResponseFile函數按以下紅色代碼修改:

      Function TLinkerLinux.WriteResponseFile(isdll:boolean) : Boolean;
      Var
        linkres      : TLinkRes;
        i            : longint;
        HPath        : TCmdStrListItem;
        s,s1,s2      : TCmdStr;
        found1,
        found2       : boolean;
        linksToSharedLibFiles, libraryadded: boolean;
      begin
        result:=False;
      { set special options for some targets }
        if cs_profile in current_settings.moduleswitches then
         begin
           if not(libctype in [glibc2,glibc21]) then
             AddSharedLibrary('gmon');
           AddSharedLibrary('c');
         end;
      
        { Open link.res file }
        LinkRes:=TLinkRes.Create(outputexedir+Info.ResName,true);
        with linkres do
          begin
            { Write path to search libraries }
            HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
            while assigned(HPath) do
             begin
               Add('SEARCH_DIR("'+HPath.Str+'")');
               HPath:=TCmdStrListItem(HPath.Next);
             end;
            HPath:=TCmdStrListItem(LibrarySearchPath.First);
            while assigned(HPath) do
             begin
               Add('SEARCH_DIR("'+HPath.Str+'")');
               HPath:=TCmdStrListItem(HPath.Next);
             end;
      
            { force local symbol resolution (i.e., inside the shared }
            { library itself) for all non-exorted symbols, otherwise }
            { several RTL symbols of FPC-compiled shared libraries   }
            { will be bound to those of a single shared library or   }
            { to the main program                                    }
            if (isdll) then
              begin
                add('VERSION');
                add('{');
                add('  {');
                if not texportlibunix(exportlib).exportedsymnames.empty then
                  begin
                    add('    global:');
                    repeat
                      add('      '+texportlibunix(exportlib).exportedsymnames.getfirst+';');
                    until texportlibunix(exportlib).exportedsymnames.empty;
                  end;
                add('    local:');
                add('      *;');
                add('  };');
                add('}');
              end;
      
            StartSection('INPUT(');
            { add objectfiles, start with prt0 always }
            if not (target_info.system in systems_internal_sysinit) and (prtobj<>'') then
             AddFileName(maybequoted(FindObjectFile(prtobj,'',false)));
            { try to add crti and crtbegin if linking to C }
            if linklibc and (libctype<>uclibc) then
             begin
               { crti.o must come first }
               if librarysearchpath.FindFile('crti.o',false,s) then
                 AddFileName('"'+s+'"')
               else
                 Message1(exec_w_init_file_not_found,'crti.o');
      
               { then the crtbegin* }
               if (cs_create_pic in current_settings.moduleswitches)
      {$ifdef RISCV}
               { on RISC-V we need to use always the *S.o variants
                 if shared libraries are involved }
               or (not SharedLibFiles.Empty)
      {$endif RISCV}
               then
                 begin
                   if librarysearchpath.FindFile('crtbeginS.o',false,s) then
                     AddFileName('"'+s+'"')
                   else
                     Message1(exec_w_init_file_not_found,'crtbeginS.o');
                 end
               else
                 if (cs_link_staticflag in current_settings.globalswitches) then
                   begin
                     if librarysearchpath.FindFile('crtbeginT.o',false,s) then
                       AddFileName('"'+s+'"')
                     else
                       Message1(exec_w_init_file_not_found,'crtbeginT.o');
                   end
                 else if librarysearchpath.FindFile('crtbegin.o',false,s) then
                   AddFileName('"'+s+'"')
                 else
                   Message1(exec_w_init_file_not_found,'crtbegin.o');
             end;
            { main objectfiles }
            while not ObjectFiles.Empty do
             begin
               s:=ObjectFiles.GetFirst;
               if s<>'' then
                AddFileName(maybequoted(s));
             end;
            EndSection(')');
      
            { Write staticlibraries }
            if not StaticLibFiles.Empty then
             begin
               Add('GROUP(');
               While not StaticLibFiles.Empty do
                begin
                  S:=StaticLibFiles.GetFirst;
                  AddFileName(maybequoted(s))
                end;
               Add(')');
             end;
      
            // we must reorder here because the result could empty sharedlibfiles
            if reorder Then
              ExpandAndApplyOrder(SharedLibFiles);
            // after this point addition of shared libs not allowed.
      
            { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
              here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
            if isdll and not linklibc then
             begin
               Add('INPUT(');
               Add(sysrootpath+info.DynamicLinker);
               Add(')');
             end;
            linksToSharedLibFiles := not SharedLibFiles.Empty;
      
            if not SharedLibFiles.Empty then
             begin
      
               if (SharedLibFiles.Count<>1) or
                  (TCmdStrListItem(SharedLibFiles.First).Str<>'c') or
                  reorder then
                 begin
                   libraryadded:=false;
                   Add('INPUT(');
                   While not SharedLibFiles.Empty do
                     begin
                       S:=SharedLibFiles.GetFirst;
                       if (s<>'c') or reorder then
                        begin
                          i:=Pos(target_info.sharedlibext,S);
                          if i>0 then
                           Delete(S,i,255);
                          Add('-l'+s);
                          libraryadded:=true;
                        end
                       else
                         linklibc:=true;
                     end;
                   { link explicitly against the dyn. linker in case we are using section threadvars and
                     if we link against any other library. We need __tls_get_addr from the dyn. linker in this case.
                     This does not hurt as in case we use a dyn. library we depend on the dyn. linker anyways.
      
                     All this does not apply if we link anyways against libc }
                   if libraryadded and not(linklibc) and not(isdll) and (tf_section_threadvars in target_info.flags) then
                     Add('-l:'+ExtractFileName(defdynlinker));
                   Add(')');
                 end
               else
                 linklibc:=true;
               if (cs_link_staticflag in current_settings.globalswitches) or
                  (linklibc and not reorder) then
                 begin
                   Add('GROUP(');
                   { when we have -static for the linker the we also need libgcc }
                   if (cs_link_staticflag in current_settings.globalswitches) then
                     begin
                       Add('-lgcc');
                       if librarysearchpath.FindFile('libgcc_eh.a',false,s1) then
                         Add('-lgcc_eh');
                     end;
                   { be sure that libc is the last lib }
                   if linklibc and not reorder then
                     Add('-lc');
                   Add(')');
                 end;
             end;
      
            { objects which must be at the end }
            if linklibc and (libctype<>uclibc) then
             begin
               if (cs_create_pic in current_settings.moduleswitches)
      {$ifdef RISCV}
               { on RISC-V we need to use always the *S.o variants
                 if shared libraries are involved }
               or linksToSharedLibFiles
      {$endif RISCV}
               then
                 begin
                   found1:=librarysearchpath.FindFile('crtendS.o',false,s1);
                   if not(found1) then
                     Message1(exec_w_init_file_not_found,'crtendS.o');
                 end
               else
                 begin
                   found1:=librarysearchpath.FindFile('crtend.o',false,s1);
                   if not(found1) then
                     Message1(exec_w_init_file_not_found,'crtend.o');
                 end;
      
               found2:=librarysearchpath.FindFile('crtn.o',false,s2);
               if not(found2) then
                 Message1(exec_w_init_file_not_found,'crtn.o');
               if found1 or found2 then
                begin
                  Add('INPUT(');
                  if found1 then
                   AddFileName('"'+s1+'"');
                  if found2 then
                   AddFileName('"'+s2+'"');
                  Add(')');
                end;
             end;
      
            { Entry point. Only needed for executables, as for shared lubraries we use
              the -init command line option instead
      
             The "ENTRY" linkerscript command does not have any effect when augmenting
             a linker script, so use the command line parameter instead }
            if (not isdll) then
              if (linksToSharedLibFiles and not linklibc) then
                info.ExeCmd[1]:=info.ExeCmd[1]+' -e _dynamic_start'
              else
                info.ExeCmd[1]:=info.ExeCmd[1]+' -e _start';
      
            add('SECTIONS');
            add('{');
            if not(cs_link_pre_binutils_2_19 in current_settings.globalswitches) then
              { we can't use ".data", as that would hide the .data from the
                original linker script in combination with the INSERT at the end }
              add('  .fpcdata           :')
            else
              add('  .data           :');
            add('  {');
            add('    KEEP (*(.fpc .fpc.n_version .fpc.n_links))');
            add('  }');
            if not(cs_debuginfo in current_settings.moduleswitches) and
               not(tf_use_psabieh in target_info.flags) then
              add('  /DISCARD/ : {*(.debug_frame)}');
            add('  .threadvar : { *(.threadvar .threadvar.* .gnu.linkonce.tv.*) }');
            add('}');
            { this "INSERT" means "merge into the original linker script, even if
              -T is used" }
            if not(cs_link_pre_binutils_2_19 in current_settings.globalswitches) then
              add('INSERT AFTER .data;');
            { Write and Close response }
            writetodisk;
            Free;
          end;
      
        WriteResponseFile:=True;
      end;

      2、跟蹤fpc編譯器發現執行以下命令時出現上面的錯誤:

      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe -b elf64-x86-64 -m elf_x86_64  --dynamic-linker=/lib64/ld-linux-x86-64.so.2 -L. -o "D:\QFLazarus4.2綠色版\projects\project1" -T "D:\QFLazarus4.2綠色版\projects\link8256.res" -e _start

      是鏈接器不支持中文引起的:

      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe -b elf64-x86-64 -m elf_x86_64  --dynamic-linker=/lib64/ld-linux-x86-64.so.2 -L. -o "D:\QFLazarus4.2綠色版\projects\project1" -T "D:\QFLazarus4.2綠色版\projects\link8256.res" -e _start
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lpthread: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -ldl: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lgdk-x11-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lgtk-x11-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lX11: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lgdk_pixbuf-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lgobject-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lglib-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lgthread-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lgmodule-2.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lpango-1.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lcairo: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -latk-1.0: No such file or directory
      D:\QFLazarus4.2綠色版\cross\bin-x86_64-win64\x86_64-linux\x86_64-linux-gnu-ld.exe: cannot find -lc: No such file or directory

      更新x86_64-linux-gnu-ld.exe,用支持中文的x86_64-linux-gnu-ld.exe替換原有的文件。
      3、最后,重新編譯相應的cross就可以。 

       

      posted on 2025-09-26 21:43  秋·風  閱讀(79)  評論(1)    收藏  舉報
      主站蜘蛛池模板: 亚洲一本大道无码av天堂| 国产91精品调教在线播放| 久久国产精品99久久蜜臀| 久久亚洲精品人成综合网| 中文日产幕无线码一区中文| 极品无码国模国产在线观看| 国内少妇偷人精品免费| 午夜福利视频| 亚洲人成亚洲人成在线观看 | 精品无码国产污污污免费| 亚洲av中文一区二区| 一道本AV免费不卡播放| 小嫩模无套内谢第一次| 精品久久久久久无码不卡| 国产精品自在线拍国产| 日韩中文字幕有码av| 国产精品剧情亚洲二区| 国产亚洲精品久久久久久久软件 | 日韩不卡一区二区三区四区 | 国产av中文字幕精品| 大肉大捧一进一出好爽视频mba | 夏邑县| 国产成人精品性色av麻豆| 日本阿v片在线播放免费| 五寨县| 人妻丰满熟妇av无码区| 美女一区二区三区亚洲麻豆| 国产人妻大战黑人第1集| 色吊丝二区三区中文写幕| 久久久无码精品午夜| 女的被弄到高潮娇喘喷水视频 | 狠狠色丁香婷婷综合尤物| 视频一区二区三区四区五区| 人妻久久久一区二区三区| 国产精品夜夜春夜夜爽久久小说| 内地偷拍一区二区三区| 粉嫩av一区二区三区蜜臀| 国产在线高清视频无码| 天堂V亚洲国产V第一次| 亚洲欧美人成人让影院| 爽爽精品dvd蜜桃成熟时电影院|