DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: melqui
今日帖子: 23
在线用户: 14
导航: 论坛 -> 信息交换 斑竹:huadugaojian,sunyesy,huangjacky  
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/27 12:22:53
标题:
Delphi 10.2写的在Linux下的HelloWorld! 浏览:5702
加入我的收藏
楼主: program Project1;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils;

var
   x: string;

begin
  try
    { TODO -oUser -cConsole Main : Insert code here }
    writeln('Helloworld! Linux!');
    writeln('Press any key to continue...');
    readln(x);
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
此帖子包含附件:
PNG 图像
大小:1,997B
----------------------------------------------
樵夫的大马甲
作者:
男 pigbaby (猪宝宝) ★☆☆☆☆ -
普通会员
2017/3/27 13:26:34
1楼: 請問您使用的LINUX是那個版本?
昨天豬寶寶灌UBUNTU 16.10 SERVER
會出現LD-LINUX.EXE 錯誤
----------------------------------------------
-
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/27 13:34:16
2楼: 我的是16.4 UBuntu Desktop版,为了测试方便
----------------------------------------------
樵夫的大马甲
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/27 13:35:24
3楼: 顺便又测试了Socket和多线程,没问题,可用!

这样,QuickBurro for Linux就可以整喽!
此帖子包含附件:
PNG 图像
大小:4.3K
----------------------------------------------
樵夫的大马甲
作者:
男 zwjchinazwj (蒲石) ★☆☆☆☆ -
普通会员
2017/3/27 14:05:07
4楼: 先看看你吃螃蟹,呵呵。说实话,真不愿意到处写DisposeOf
----------------------------------------------
-
作者:
男 lsz100 (lsz) ★☆☆☆☆ -
盒子活跃会员
2017/3/27 15:49:15
5楼: 能吃上螃蟹渣渣 也不差
----------------------------------------------
我为人人为我
作者:
男 delphiilove (乌羽玉) ★☆☆☆☆ -
普通会员
2017/3/27 16:25:57
6楼: 怎么创建 Linux 的程序,我在 工程管理器里 怎么不能添加  Linux 的平台呢。
感谢各位了。
----------------------------------------------
-
作者:
男 zwjchinazwj (蒲石) ★☆☆☆☆ -
普通会员
2017/3/27 16:38:03
7楼: Linux只能是控制台,你十之八九搞个VCL或者FMK程序。
----------------------------------------------
-
作者:
男 wg961423 (麦子仲肥) ★☆☆☆☆ -
盒子活跃会员
2017/3/27 16:45:04
8楼: @delphiilove (箭候)
新建一个控制台工程,再在工程工程管理器里添加  Linux

PS:如果你确定已经安装了Linux的部分,且按上面的步骤还是没有出现,那恭喜你,你的SLIP生成的不对!

请不要用下载到的注册机源码去编译生成SLIP,因为那个不是最新版的,生成的SLIP不支持Linux!
----------------------------------------------
-
作者:
男 delphiilove (乌羽玉) ★☆☆☆☆ -
普通会员
2017/3/27 16:58:08
9楼: 非常感谢 zwjchinazwj (蒲石) wg961423 (麦子仲肥) 。
能在控制台程序里添加Linux。
 结果 弹出来一个 对话框向导 ,需要填写 ip 地址 什么的。

是否必须 要有个 安装了 Linux 的 电脑 啊。
----------------------------------------------
-
作者:
男 wac1104 (火鸟) ★☆☆☆☆ -
普通会员
2017/3/27 17:23:09
10楼: 我用的Centos 7  简单测试可以使用。不过有时候会出现ide假死的情况
----------------------------------------------
火鸟
作者:
男 zwjchinazwj (蒲石) ★☆☆☆☆ -
普通会员
2017/3/27 18:22:28
11楼: https://synopse.info/forum/viewtopic.php?id=3885
win64会导致IDE假死,使用命令行也会假死,由此判断应该是编译器的问题

https://forums.embarcadero.com/thread.jspa?threadID=248237&tstart=0
移动平台,性能似乎大幅降低
----------------------------------------------
-
作者:
男 uhjiok123 (三樱椒) ▲▲▲△△ -
普通会员
2017/3/27 18:33:12
12楼: 现在只能搞控制台吗?  有基本的VCL神马的吗?
----------------------------------------------
菜鸟
作者:
男 leisure520 (高家坳小宝) ▲▲▲▲▲ -
普通会员
2017/3/27 20:48:59
13楼: Linux本来大多数是无界面的,因为Linux一般是来做服务器的。
你实在需要界面的话,目前最好的解决方案是QT,可以真正的跨平台,不过你懂得,授权怎么办,而且还有点贵。
----------------------------------------------
-
作者:
男 leisure520 (高家坳小宝) ▲▲▲▲▲ -
普通会员
2017/3/27 20:51:38
14楼: 有点怀疑是不是拿了开源的lazarus作为跨平台。
----------------------------------------------
-
作者:
男 go_on (go_on) ★☆☆☆☆ -
盒子活跃会员
2017/3/27 21:21:45
15楼: 支持arm cpu吗?还是只支持x64
----------------------------------------------
-
作者:
男 kenliaoliao (ben) ★☆☆☆☆ -
普通会员
2017/3/28 7:52:20
16楼: 楼主:
  能在CentOS 6 上运行吗?
----------------------------------------------
-
作者:
男 wac1104 (火鸟) ★☆☆☆☆ -
普通会员
2017/3/28 8:17:09
17楼: 我用的centos7  测试成功,不过IDE编译部署时经常性假死,centos 6 CLIBC  和ZLIB 版本有问题
----------------------------------------------
火鸟
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 8:24:18
18楼: 我在UBuntu上试的,正常!
Centos上没试。

测试后发现system.zlib等单元不正常
----------------------------------------------
樵夫的大马甲
作者:
男 wac1104 (火鸟) ★☆☆☆☆ -
普通会员
2017/3/28 8:35:03
19楼: CentOS6.8 安装后 提示 :用yum 无法更新,手动更新到对应版本,估计能解决
[root@localhost PAServer-19.0]# ./paserver
./paserver: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by ./paserver)
./paserver: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./paserver)
./paserver: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./paserver)
./paserver: /lib64/libz.so.1: version `ZLIB_1.2.3.4' not found (required by ./paserver)
./paserver: /lib64/libz.so.1: version `ZLIB_1.2.3.5' not found (required by ./paserver)
----------------------------------------------
火鸟
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 13:13:58
20楼: Linux64还是有些问题,比如,我在进行Blowfish算法验证时,
Windows 64下没问题,转到Linux64下就会出错:
此帖子包含附件:
JPEG 图像
大小:30.4K
----------------------------------------------
樵夫的大马甲
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 13:14:21
21楼: Linux 64下出错:
此帖子包含附件:
PNG 图像
大小:1,698B
----------------------------------------------
樵夫的大马甲
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 13:16:09
22楼: //
// 测试BlowFish加密算法...
    Fish:=TMBFish.Create;
    setlength(keys,10);
    keys[0]:=0;
    keys[1]:=1;
    keys[2]:=2;
    keys[3]:=3;
    keys[4]:=4;
    keys[5]:=5;
    keys[6]:=6;
    keys[7]:=7;
    keys[8]:=8;
    keys[9]:=9;
    fish.InitialiseByte(keys,length(keys));
    //
    data:='It is a data block for testing.1111'
        +'It is a data block for testing.2222'
        +'It is a data block for testing.3333'
        +'It is a data block for testing.4444'
        +'It is a data block for testing.5555'
        +'It is a data block for testing.6666';
    writeln('');
    writeln('Begin testing Blowfish. Decrypt data: '+data);
    //
    buff1:=bytesof(data);
    writeln('Decrypt data length='+inttostr(length(buff1)));
    fish.EncBytes(buff1,buff2);
    writeln('Encrypt successful. Encrypted data length='+inttostr(length(buff2)));
    //
    fish.DecBytes(buff2,buff1);
    writeln('Decrypt successful. Decrypt data length='+inttostr(length(buff1)));
    data2:=stringof(buff1);
    writeln('Decrypted data: '+data2);
    //
    FreeAndNil(Fish);


完全一样的程序!
----------------------------------------------
樵夫的大马甲
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 13:22:47
23楼: 使用System.zlib里的方法时,直接编译出错!
此帖子包含附件:
PNG 图像
大小:32.0K
----------------------------------------------
樵夫的大马甲
作者:
男 wang_80919 (Flying Wang) ★☆☆☆☆ -
普通会员
2017/3/28 13:26:53
24楼: fish 这个控件,哪里下的?
----------------------------------------------
(C)(P)Flying Wang
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 14:03:22
25楼: 哦,这个是Blowfish算法,网上有下载

我稍加改写,用在了Firemonkey里
----------------------------------------------
樵夫的大马甲
作者:
男 biznow (biznow) ★☆☆☆☆ -
盒子活跃会员
2017/3/28 15:27:30
26楼: jopher3, 使用System.zlib里的方法时,直接编译出错!是你缺少zlib1g-dev包

本人测试OK
此帖子包含附件:
PNG 图像
大小:42.5K
----------------------------------------------
-
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 15:42:58
27楼: 哦?
谢谢楼上!
----------------------------------------------
樵夫的大马甲
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 15:49:44
28楼: 不对,26楼,我是说system.zlib,不是system.zip
----------------------------------------------
樵夫的大马甲
作者:
男 biznow (biznow) ★☆☆☆☆ -
盒子活跃会员
2017/3/28 17:03:56
29楼: 呵呵,是噢,zlib,稍等,我看看
----------------------------------------------
-
作者:
男 biznow (biznow) ★☆☆☆☆ -
盒子活跃会员
2017/3/28 17:10:12
30楼: 我看了,也是ok的,zlib1g-dev这个包
此帖子包含附件:
PNG 图像
大小:42.8K
----------------------------------------------
-
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 17:18:02
31楼: 楼上的,直接说,这个包哪里去找? 怎么加进delphi?
----------------------------------------------
樵夫的大马甲
作者:
男 biznow (biznow) ★☆☆☆☆ -
盒子活跃会员
2017/3/28 17:43:33
32楼: sudo apt-get install zlib1g-dev
----------------------------------------------
-
作者:
男 jopher3 (樵夫的马六甲) ▲▲▲▲▲ -
普通会员
2017/3/28 20:47:23
33楼: 谢谢楼上!
难道编译的时候也要访问一下Linux? 水有点深了
----------------------------------------------
樵夫的大马甲
作者:
男 hujiacheng ( 旺财) ★☆☆☆☆ -
普通会员
2017/4/11 20:47:38
34楼: [DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\ld-linux.exe: error: cannot find -lz
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::deflate(System::Zlib::z_stream&, int): error: undefined reference to 'deflate'
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::deflateEnd(System::Zlib::z_stream&): error: undefined reference to 'deflateEnd'
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::inflate(System::Zlib::z_stream&, int): error: undefined reference to 'inflate'
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::inflateEnd(System::Zlib::z_stream&): error: undefined reference to 'inflateEnd'
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::inflateReset(System::Zlib::z_stream&): error: undefined reference to 'inflateReset'
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::deflateInit2_(System::Zlib::z_stream&, int, int, int, int, int, char*, int): error: undefined reference to 'deflateInit2_'
  c:\program files (x86)\embarcadero\studio\19.0\lib\Linux64\debug\System.ZLib.o:System.ZLib:function System::Zlib::inflateInit2_(System::Zlib::z_stream&, int, char*, int): error: undefined reference to 'inflateInit2_'


如何解决?求解。。
----------------------------------------------
免费的FTPhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi-z.ruhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi.icm.edu.pl/ftp/https://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi-z.ruhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019
作者:
男 hujiacheng ( 旺财) ★☆☆☆☆ -
普通会员
2017/4/14 22:06:43
35楼: http://www.cnblogs.com/onechen/p/6598843.html
----------------------------------------------
免费的FTPhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi-z.ruhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi.icm.edu.pl/ftp/https://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi-z.ruhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019
作者:
男 hujiacheng ( 旺财) ★☆☆☆☆ -
普通会员
2017/4/15 11:54:40
36楼: 解决方法
1 linxu下sudo apt-get install zlib1g-dev
2 工程或者IDE设置 edit SDK       click UPDATE LOCAL FILE CACHE
----------------------------------------------
免费的FTPhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi-z.ruhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi.icm.edu.pl/ftp/https://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019>http://delphi-z.ruhttps://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win64/zh-CN/https://cc.embarcadero.com/Author/575019
作者:
男 yangtze (mcjmcj) ★☆☆☆☆ -
普通会员
2017/4/16 10:37:06
37楼: 可以交叉编译到arm linux吗?
----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行363.2813毫秒 RSS