Forum > Unix
Running a program compiled by Lazarus in another linux
nullpointer:
I tried to make a simple application using lazarus in linux (Ubuntu 16.04).
After compile it, I try to run the compiled app in another linux machine but the app cannot run.
I've tried using chmod + x appname command but nothing happen. the App can only run on ubuntu 16.04.
what the problem?
Thaddy:
Try this simple program and see if that will run on both machines. If it does, you have a dependency issue and probably have to install some libraries on the other machine or link statically.
Save and compile it from a console as: fpc -CX -XXs test.pas run as ./test
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program test; // program without external dependenciesbegin writeln('test'); readln;end.
Also:
- has the second machine a compatible processor? i.e. you can't run arm code on an intel
- has the second machine the same bitness? you can't run 64 bit code on a 32 bit installation
Handoko:
To check your application setting for machine compatibility (as what Thaddy said), do this:
Lazarus main menu > Project > Project Options > Config and Target
nullpointer:
--- Quote from: Thaddy on July 04, 2017, 08:53:33 am ---Try this simple program and see if that will run on both machines. If it does, you have a dependency issue and probably have to install some libraries on the other machine or link statically.
Save and compile it from a console as: fpc -CX -XXs test.pas run as ./test
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program test; // program without external dependenciesbegin writeln('test'); readln;end.
Also:
- has the second machine a compatible processor? i.e. you can't run arm code on an intel
- has the second machine the same bitness? you can't run 64 bit code on a 32 bit installation
--- End quote ---
thank you thaddy.
i think, it may i compiled on 64 bit and run it on 32 bit.
nullpointer:
--- Quote from: Handoko on July 04, 2017, 10:08:42 am ---To check your application setting for machine compatibility (as what Thaddy said), do this:
Lazarus main menu > Project > Project Options > Config and Target
--- End quote ---
terima kasih solusinya mas bro.
salam kenal. :D
Navigation
[0] Message Index
[#] Next page