[SOLVED]Cross compiling win32 on linux, embedded resource? lazarus / 1-Linux ---------------------------------------------------------------------- snorkel · 2014-02-24 18:45 Got the cross compiler working on my Linux box, but when I compile a project to win32 that has uses a resource file it complains that it can't find the resource compiler.  Do I need wine installed to get this working? ---------------------------------------------------------------------- Cyrax · 2014-02-24 19:20 If you are using Ubuntu, install mingw32-binutils or binutils- mingw-w64-i686 package. ---------------------------------------------------------------------- snorkel · 2014-02-24 19:29 Thanks  yes I am using a ubuntu based os (mint) ---------------------------------------------------------------------- snorkel · 2014-02-24 19:31 ok installed the mingw stuff, getting this error: windres" not found, switching to external mode ---------------------------------------------------------------------- Cyrax · 2014-02-24 19:40 You need to tell FPC where to find windres and what prefix to use to launch it. mingw32-binutils: Use i586-mingw32msvc prefix. binutils-mingw-w64-i686: Use i686-w64-mingw32. ---------------------------------------------------------------------- snorkel · 2014-02-24 19:56 ok, I found the mingw windres and renamed it, now the compiler finds it, but it still fails to compile: windres [option(s)] [input-file] [output-file] windres: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex Compiling resource /home/snorkel/lazarus projects/sft_admin_svn/updater.rc sftadmin.lpr(40,1) Error: Error while compiling resources. Compile with -vd for more details. Check for duplicates. sftadmin.lpr(40,1) Fatal: There were 1 errors compiling module, stopping when I run it from the command line it works fine: windres updater.rc updater.res ---------------------------------------------------------------------- snorkel · 2014-02-24 20:18 with -vd Calling resource compiler "/usr/bin/windres" with "-- preprocessor=/usr/bin/cpp --include /usr/bin/ -O res -o "/home/snorkel/lazarus projects/sft_admin_svn/lib/i386-win32/updater.res" /home/snorkel/lazarus projects/sft_admin_svn/updater.rc" as command line This seems backwards as the .rc file is the source not the destination. ---------------------------------------------------------------------- snorkel · 2014-02-24 20:42 If I take out the {$R updater.rc}   and replace it with {$R updater.res} it compiles in the one I built manually from the command line no problem. Seems to be a issue calling the windres executable in Lazarus.  This is with 1.2RC2  Bug in 1.2rc2? ---------------------------------------------------------------------- BigChimp · 2014-02-25 08:07 What does the -o "blalblalba.res" mean in the windres call? Probably -output file? If so, that seems fine to me?!? What happens if you call windres with those arguments manually? Error messages? ---------------------------------------------------------------------- snorkel · 2014-02-25 15:39 I didn't try that.  Will try it and report back if it worked. Even if it doesn't building the resource manually is not a big deal and it works. ---------------------------------------------------------------------- snorkel · 2014-02-25 16:05 well, I got it working.  the problem was the space in my project folder  i.e. lazarus projects renamed to lazarus_projects and it works fine now.