Recent

Author Topic: configuration for a linux application  (Read 6632 times)

H.L. ter Elst

  • Newbie
  • Posts: 2
configuration for a linux application
« on: September 23, 2010, 06:35:48 pm »
I'm a new user of Lazarus.
My OS is UBuntu 10.04
installed Lazarus: IDE v0.9.28.2

In the past I made some applications for Microsoft Windows with Delphi.
After compiling you get a exe file. And then you can run it.

Now for Linux.
Making a commandline program for Linux.
A program that say's "HELLO" on the terminal window.
(verry small program)
 
Where can I find the configuration settings of the compiler to make a linux appl.
And some explanations of the inputs and outputs.
What do I have to do after compiling : installing ? How ?

Thanks for your time to help me.

garlar27

  • Hero Member
  • *****
  • Posts: 606
Re: configuration for a linux application
« Reply #1 on: September 23, 2010, 09:35:46 pm »
If your project is project1.lpi
then to run it you have to type this in the terminal:
Code: [Select]
./project1
and press return

the "./" tells the terminal to execute that program. I don't know why we have to do that it didn't happened in slackware 11 ....

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1890
Re: configuration for a linux application
« Reply #2 on: September 23, 2010, 10:46:56 pm »
In the Lazarus IDE choose:
Project -> New Project -> Program
This is a commandline program.
Then it will compile inside the Lazarus IDE.
If you are interested in how the command line params look.
See Project -> Project Options -> Show Options Button
Might look like:
 -MObjFPC -Scghi -O1 -gl -vewnhi -l -Filib/i386-linux/ -Fu. -FUlib/i386-linux/ -oproject1

eny

  • Hero Member
  • *****
  • Posts: 1587
Re: configuration for a linux application
« Reply #3 on: September 24, 2010, 07:54:12 am »
the "./" tells the terminal to execute that program. I don't know why we have to do that it didn't happened in slackware 11 ....
Maybe in SW 11 the current directory "." was added to each users search path by default.
All posts based on: Win10 (Win64); Lazarus 1.8.0 'stable' (#56594 win64) unless specified otherwise...

H.L. ter Elst

  • Newbie
  • Posts: 2
Re: configuration for a linux application
« Reply #4 on: September 24, 2010, 09:03:06 am »
Thanks for all.

The option ./ helps a lot. It starts the programm.
Why is that programm 800KB large ? Just for 1 text output line.


bflm

  • Jr. Member
  • **
  • Posts: 54
    • Free Pascal Random Bits
Re: configuration for a linux application
« Reply #5 on: September 24, 2010, 11:58:35 am »
Why is that programm 800KB large ? Just for 1 text output line.

You may have a binary with debug symbols not stripped. See also:
http://wiki.lazarus.freepascal.org/Size_Matters