lazarus使用unidac交叉编译时可能出现链接错误:

Debug: D:\fpcupdeluxe4\cross\bin\loongarch64-linux\loongarch64-unknown-linux-gnu-ld.exe: D:\fpcupdeluxe4\demo\LargeModel_loong\lib\loongarch64-linux\LargeModels.o:(.debug_info+0x732c2): undefined reference to `DBG2_$SYSTEM_$$_IUNKNOWN' Error: Error while linking
一、错误的原因:
最后发现是如果project options的compiler options-->debugging-->Debugger info-->type of debug info选择以下2项时就会出现以上的错误:
Dwarf 2 with sets (-gw -godwarfsets) Dwarf 2(-gw2)

二、2个解决方法:
1、如使用unidac在交叉编译时出现以上述错误时,可将Debugger info的type of debug info设置为其他的参数,如:Dwart 3 (beta) (-gw3),设置后重新编译就可以。
2、如果不需远程调试可以取消Generate info the debugger(slower/increases exe-size)这个选项。


 
                    
                     
                    
                 
                    
                 

 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号