Recent

Author Topic: New User - Compiling Problem  (Read 18735 times)

Davo

  • Full Member
  • ***
  • Posts: 134
New User - Compiling Problem
« on: November 11, 2009, 11:15:51 pm »
I have just downloaded and installed Lazarus into directory C/lazarus.

Some time ago I had access to Delphi 5 and created a number of applications then so I am familiar with the general use of the Delphi RAD / IDE.

To get started with Lazarus I have tried to compile / run a simple application from a new project involving just one button on an otherwise blank form but the following are included in the compiler messages :

windres: can't open file 'project1.manifest': No such file or directory
project1.lpr(20,1) Error: Error while linking
project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping

Can someone please indicate what the problem is?

Thank you.

vix

  • New Member
  • *
  • Posts: 27
Re: New User - Compiling Problem
« Reply #1 on: November 11, 2009, 11:21:41 pm »
Did you save this project before compilation?
Tarzan no understand what mean syntax error...
..look out for my english..

Davo

  • Full Member
  • ***
  • Posts: 134
Re: New User - Compiling Problem
« Reply #2 on: November 12, 2009, 12:21:25 am »
Thank you!  Something so simple!  Yes I have just re-run the simple project and saved it before compiling as you suggested.  It compiles and runs perfectly now.  Again thank you.

kees

  • New Member
  • *
  • Posts: 13
Re: New User - Compiling Problem
« Reply #3 on: November 13, 2009, 10:02:49 pm »
Hi,

I had the same problem after a fresh installation of 0.9.28.2, found after searching the lazarus site a simular bug that was solved, which made me save and recompile.

Should this be reported as a bug?

Regards,

Kees

whatsup

  • Jr. Member
  • **
  • Posts: 59
Re: New User - Compiling Problem
« Reply #4 on: January 20, 2010, 04:50:25 pm »
i had the same problem, and this thread helped me solve this.
but now i have a question
i used only one empty form
the exe file is more than 11MB, why it has to be so big ? and how to reduce it ?

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: New User - Compiling Problem
« Reply #5 on: January 20, 2010, 05:13:29 pm »
« Last Edit: January 20, 2010, 05:30:34 pm by Troodon »
Lazarus/FPC on Linux

whatsup

  • Jr. Member
  • **
  • Posts: 59
Re: New User - Compiling Problem
« Reply #6 on: January 20, 2010, 07:04:21 pm »
thank you, but it didn't completly save my problem,
i could reduce the size to 1.6 MB
i used empty form, and in the uses section i put only forms and Lresource

but 1.6MB is a way too big for this kind of empty app

what am i missing ?
i guess that lazarus probably links to some unused libs,
how can i tell it not to do that ?

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: New User - Compiling Problem
« Reply #7 on: January 20, 2010, 07:15:55 pm »
You are not missing anything. That is likely the minimal size for your application. But don't fret the minor things; develop your application and you will notice only small increases in size as you add more code.
Lazarus/FPC on Linux

whatsup

  • Jr. Member
  • **
  • Posts: 59
Re: New User - Compiling Problem
« Reply #8 on: February 02, 2010, 09:20:37 am »
is there a way to tell lazarus not to link to some libs, so the file size can reduce ?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: New User - Compiling Problem
« Reply #9 on: February 02, 2010, 11:24:27 am »
Well, if you understand how LCL is structured (it's been refactored to decrease the size of final app a couple of times) then you'll understand that such size is normal.

The actual, totally smartlinked and stripped empty form program should be around 900K on Windows. The size should differ very little on other platforms.

thierrybo

  • Full Member
  • ***
  • Posts: 146
Re: New User - Compiling Problem
« Reply #10 on: February 02, 2010, 01:53:22 pm »
Hi,

On Windows XP 32 bits with an empty application I get ~ 1,7 Mega (Edit: this was with 0.9.26, with 0.9.28-2 this is now 1,5 Mega) and 2,7 Mega (Lazarus 0.9.28-2) on Ubuntu 64 bits only with compiler options.

You may have to recompile whole Lazarus/LCL without debug information (-g-) to achieve this.
« Last Edit: February 02, 2010, 06:08:10 pm by thierrybo »

thierrybo

  • Full Member
  • ***
  • Posts: 146
Re: New User - Compiling Problem
« Reply #11 on: February 04, 2010, 07:41:43 pm »
Well I ran tests I did on Lazarus 0.9.29 for my personal use with new Lazarus 0.9.28.2. This is from default packages. FPC 2.2.4 included with Windows archive. For Ubuntu Lazarus is installed from Freepascal Debian/Ubuntu repository. This installs FPC 2.2.4 from the same repository with Ubuntu 9.04 or FPC 2.2.4 from Ubuntu repository for Ubuntu 9.10.

   Default Lazarus    LCL without debug informations
Ubuntu 64 bits / Lazarus 64 bits
Default application    13,4  Mb    7,5 Mb
Optimized compiler    4,4 Mb    2,70 Mb
   
Ubuntu 32 bits / Lazarus 32 bits
Default application    19,6  Mb ( :o )    5,7 Mb
Optimized compiler    2,9 Mb    1,6 Mb
   
Windows XP 32 bits / Lazarus 32 bits
Default application    11,8 Mb    2,14 Mb
Optimized compiler    1,62 Mb    1,50 Mb
   
Windows Seven 64 bits / Lazarus 64 bits
Default application    12,3  Mb    3,20 Mb
Optimized compiler    2,14 Mb    2,16 Mb
« Last Edit: February 06, 2010, 11:45:38 am by thierrybo »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: New User - Compiling Problem
« Reply #12 on: February 05, 2010, 07:21:43 am »
I believe you didn't enable smartlinking (WARNING: linking stage would be VERY SLOW and MEMORY CONSUMING on Unices). It should be smaller than that.

thierrybo

  • Full Member
  • ***
  • Posts: 146
Re: New User - Compiling Problem
« Reply #13 on: February 05, 2010, 08:48:24 pm »
Here is the my command line parameters to achieve 1.50Mb with Windows XP :

Code: [Select]
-MObjFPC -Scgi -CX -Os2 -Xs -XX -WG -vewnhi -l -Fibin\ -FuC:\programs\lazarus\lcl\units\i386-win32\ -FuC:\programs\lazarus\lcl\units\i386-win32\win32\ -FuC:\programs\lazarus\packager\units\i386-win32\ -Fu. -FUbin\ -FEbin\ -oproject1.exe -dLCL -dLCLwin32

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: New User - Compiling Problem
« Reply #14 on: February 05, 2010, 09:16:55 pm »
Just a comment -- Some of the forum users seem to be concerned with the difference between 1 MB and 2 MB for an application that opens an empty form. It's what the application can do for the end user, particularly in terms of performance, that matters more than anything else. Take Lazarus/FPC, for instance: the installer file size is 70 MB, give or take a few megs. After installation, my Lazarus folder size on disk is almost 1 GB. Is anybody worried about file size when downloading the application? I doubt it. Now, take the empty form application and add, say, a few GLScene objects and function calls to it; executable size jumps up to around 4 MB. But that is not an issue, considering what the application is supposed to do (3D graphics). I think "the price to pay" in terms of file size is acceptable for the amazing things one can do in Lazarus/FPC.
« Last Edit: February 06, 2010, 12:34:07 am by Troodon »
Lazarus/FPC on Linux

 

TinyPortal © 2005-2018