Results 1 to 10 of 11

Thread: Why Lazarus is rebuilding project each time i run?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Why Lazarus is rebuilding project each time i run?

    Hi.

    I installed latest Lazarus v1.0.8. Fortunately it doesn't crash anymore (XP Pro) like previous version.

    I created simple project with empty form and i noticed that each time i run my project it recompiles / rebuilds it.
    Even if i don't change anything.
    Delphi doesn't do that. It re-compiles only after some changes in project / source were made.
    Compiling is slow enough without that, why make it slower.
    I just lost 256MB bulk RAM (it just died) and now i have even less RAM in PC and its even slower. So every bit counts.


    Is there any way to disable this and make Lazarus smarter?
    Last edited by hwnd; 28-04-2013 at 09:37 AM.

  2. #2
    Project options -> Miscellaneous -> Uncheck "Always build (even if nothing changed)".

    It's ok to have unchecked most of the time, but if you change some library files (such as update graphics/game library sources), get new Lazarus from SVN or something, then you may have outdated output folder for your project. It could result a mysterious error message, which you can solve by deleting the whole output folder from the project, or putting this check back temporarily. This will force them to recompile.

    You could also try enabling Smart linkable (-CX) and Link smart (-XX) checkboxes to try speed up compilation.
    Last edited by User137; 28-04-2013 at 10:06 AM.

  3. #3
    Thanks. That made it a lot faster.

    I was looking for such options in IDE settings. Now i know why i didn't find anything.

  4. #4
    Didnt want to create new thread.
    Installed a Lazarus 1.1 with date of 2013-08-04 and with FPC 2.7.1.
    This version because i need generics and stl.

    And after creating new project and saving it and then running i always get error and it just stops:


    Options changed, recompiling clean with -B
    Failed to execute -B -MObjFPC -Scghi -O1 -g -gl -vewnhi -FiC:\Temp2\lib\i386-win32 -FuC:\Temp2\ -FUC:\Temp2\lib\i386-win32\ -l project1.lpr : 2


    What it wants from me?

    I can use commandline but why IDE fails each time i install 1.1?

  5. #5
    Just something to try:
    - Tools -> Options: Environment -> Files. Check that all paths point to right places.
    - Tools -> Rescan FPC source directory.
    - Tools -> Build Lazarus with Profile: Clean Up + Build all.

  6. #6
    Tried all 3 options, still same.
    Too bad, i wanted to make simple gui app with few buttons to test some algorithm for undo/redo with generics and stl.
    But i guess i have to live with console app and command line compiling.

    Dunno, if i point some working version of lazarus to fpc 2.7.x instead of "built in version" will it work?

    Will install lazarus-1.0.10-fpc-2.6.2-win32 and try again.
    Maybe even this will not work.

    EDIT: Like expected, v1.0 with 2.6.x works fine.
    So its a big bug in Lazarus

    EDIT2

    Downloaded fpc-2.7.1.i386-win32.zip, created folder called 2.7.1 and extracted all files to this folder. Executed Lazarus and pointed it to this folder. It said something about invalidf paths for make and one about fpc.cfg file is missing or something but i copied it over from 2.6.2 bin folder.
    And it works. Lazarus is 1.0.10.
    I dont know if this will work with 1.1 but atm im satisfied.
    Decided to take the risk and try and to my suprise it compiles successfully.
    Generics, stl etc, also available in GUI app.

    Looks also much more stable.

    Im happy.
    Last edited by hwnd; 04-08-2013 at 08:26 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •