Compilation of app fail if directory contain spaces lazarus / 13-General ---------------------------------------------------------------------- sasa · 2010-01-20 07:23 FPC 2.4.0, one of the latest Lazarus SVN. Compilation of app fail if directory where the sources are contain spaces, showing that cannot compile resources. Bug or the feature? ---------------------------------------------------------------------- Ñuño_Martínez · 2010-01-20 09:36 File and directory names containing spaces are evil. Don't use them. If you want to separate words in file or directory names use "_" or "." instead. Fore example "my_program" or "my.program". ---------------------------------------------------------------------- sasa · 2010-01-20 10:19 Quote from: Ñuño_Martínez on January 20, 2010, 10:36:37 amFile and directory names containing spaces are evil. Don't use them. If you want to separate words in file or directory names use "_" or "." instead. Fore example "my_program" or "my.program". Spaces are fairly legal in Delphi and W2K+, as well on Linux... Seems the problem is simply missing a pare of "" during sending parameters when compile resources, or resource compiler parser need to be improved a bit... P.S. I'm not allowed to change design of directories during portion from Delphi to Lazarus. ---------------------------------------------------------------------- Ñuño_Martínez · 2010-01-20 17:08 Quote from: sasa on January 20, 2010, 11:19:33 amSpaces are fairly legal in Delphi and W2K+, as well on Linux... Yes, but you see it's problematic, isn't it? That's why I said it's evil. BTW, may be you can try to compile the resources by hand adding the ["] character to the command line. Another option: let Lazarus to create a Makefile. Then edit it to add the ["] character and use the "make". [edit] Can't find the "Create makefile" button now but I swear it existed... ---------------------------------------------------------------------- marcov · 2010-01-20 21:02 I tried to reproduce this with 2.4.0, but couldn't: D:\tst tst>fpc tres Free Pascal Compiler version 2.4.0 [2009/12/18] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS: Win32 for i386 Compiling tres.pp Compiling resource tres.or Linking tres.exe 59 lines compiled, 0.2 sec , 27264 bytes code, 1800 bytes data D:\tst tst> So either it is lazarus (and not fpc 2.4.0) that makes the mistake, or there is something else but the main dir having spaces too. ---------------------------------------------------------------------- sasa · 2010-01-21 05:17 Quote from: marcov on January 20, 2010, 10:02:39 pmI tried to reproduce this with 2.4.0, but couldn't: ... So either it is lazarus (and not fpc 2.4.0) that makes the mistake, or there is something else but the main dir having spaces too. Thank you for your reply. Lazarus send full path to resource compiler. Steps to reproduce the problem: 1. Create a new LCL application from Lazarus wizard 2. Save the project and unit to directory have spaces 3. Compile/Run (F9) Compiling resource /home/sasa/Test project/lib/i386-linux/project1.or project1.lpr(19,1) Error: Error while compiling resources project1.lpr(19,1) Fatal: There were 1 errors compiling module, stopping ---------------------------------------------------------------------- Troodon · 2010-01-21 07:07 if in the .lpr file you have both a ($R ... .rc} and a {$R ... .res} line, try deleting one of them ---------------------------------------------------------------------- marcov · 2010-01-22 12:07 Sasa,can you dig up the FPC commandline for that compile? ---------------------------------------------------------------------- sasa · 2010-01-22 15:44 Quote from: marcov on January 22, 2010, 01:07:41 pmSasa,can you dig up the FPC commandline for that compile? Not at the moment, but answer is inside sources... Anyway I reported this  in bugtracker. Quote from: Ñuño_Martínez on January 20, 2010, 06:08:24 pm Another option: let Lazarus to create a Makefile. Then edit it to add the ["] character and use the "make". [edit] Can't find the "Create makefile" button now but I swear it existed... "Create makefile" button do not exist from long time ago. Was worked makefile, IIRC... From long time ago, that was replaced with checkbox in Project Options -> Compiler Options -> Compilation. Unfortunately,  makefile will not be created even compilation is successfull... ---------------------------------------------------------------------- Troodon · 2010-01-22 16:26 Cannot reproduce the issue in Lazarus 0.9.29 + FPC 2.5.1. Installation is in a directory w/o spaces, project is saved to a directory w/ spaces.