Delphi10.2在linux下编译遇到的问题笔记  
官方Delphi 学习QQ群: 682628230(三千人)
频道

Delphi10.2在linux下编译遇到的问题笔记


最近搞项目遇到的记录下留个档


1、Linux下没有Ansistring变量类型,只能全局使用 string ,需要自己处理好 Ansi转Unicode的问题


2、Linux 64位下的LongWord是8个字节的,坑挺大原因未知,不过官方文档中提过


Description

Platform-dependent unsigned integer type.


LongWord represents a subset of the natural numbers. LongWord size and range depend on the target platform:


On 32-bit platforms and 64-bit Windows platforms, LongWord is a 4-byte unsigned integer with the range [0 .. 4294967295] (0 through 232-1).

Note: 32-bit platforms include 32-bit Windows, 32-bit macOS, 32-bit iOS, and Android.

On 64-bit POSIX platforms (iOS and Linux), LongWord is an 8-byte unsigned integer with the range [0 .. 18446744073709551615] (0 through 264-1).

Note: If you want to use a 4-byte unsigned integer type, use  FixedUInt or  Cardinal.

这里使用Cardinal替代即可


3、Linux下TStringStream使用里面的值需为宽字节才能使用 DataString输出,如果要使用窄字节则要在创建类的时候申明编码


TStringStream.Create('',TEncoding.ANSI);



后面如果遇到其他问题再追加

————————————————


原文链接:https://blog.csdn.net/yoie01/article/details/80882833



推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.044778108596802 seconds