Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Installation
»
Windows (32/64)
»
Error: resource compiler "windres.exe" not found, switching to external mode
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
FAQ
Wiki
Bugtracker
Packages
IRC channel
Developer Blog
Follow us on Twitter
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
2
Author
Topic: Error: resource compiler "windres.exe" not found, switching to external mode (Read 10621 times)
apostleofchrist
New member
Posts: 21
Error: resource compiler "windres.exe" not found, switching to external mode
«
on:
March 04, 2016, 03:21:07 pm »
Greetings fellow developers!
I have hit a wall here. I uninstalled my previous version of Lazarus in order to use the new 1.6.
I downloaded and installed, as I always have and when I tried to compile my project, I've got this message:
Code: Pascal
[Select]
epassdist
.
lpr
(
34
,
1
)
Error
:
resource compiler "windres
.
exe
"
not
found
,
switching
to
external
mode
I've searched inside Lazarus instalation folder for that file and it isn't anywhere.
Here it is my .lpr file code:
Code: Pascal
[Select]
program
epassdist
;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads
,
{$ENDIF}{$ENDIF}
Interfaces
,
// this includes the LCL widgetset
Forms
,
udistprincipal
,
LResources
,
zcomponent
,
datamod1
,
printer4lazarus
,
memdslaz
;
{$IFDEF WINDOWS}{$R epassdist.rc}{$ENDIF}
const
//IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000;
// Following are already defined in D7's Windows.pas
IMAGE_FILE_RELOCS_STRIPPED
=
$0001
;
IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP
=
$0400
;
IMAGE_FILE_NET_RUN_FROM_SWAP
=
$0800
;
//{$R *.res}
//{$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
{$SetPEFlags IMAGE_FILE_RELOCS_STRIPPED
or IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP
or IMAGE_FILE_NET_RUN_FROM_SWAP}
begin
{$I epassdist.lrs}
Application
.
Initialize
;
Application
.
CreateForm
(
TFrmDistPrincipal
,
FrmDistPrincipal
)
;
Application
.
CreateForm
(
TDM1
,
DM1
)
;
Application
.
Run
;
end
.
I'd appreciate any assistance you may provide.
Thank you.
Logged
molly
Hero Member
Posts: 2343
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #1 on:
March 04, 2016, 03:35:03 pm »
windres is part of fpc (and should be located inside its platform dependent directory), in my particular Free pascal specific case: G:\WinDev\FPC\3.0.0\bin\i386-win32\windres.exe
Since you've installed Lazarus 1.6 (assuming release candidate there), you should be able to find it inside your FPC (3.0) directory.
When you started lazarus for the first time, was it able to find you fpc and fpc sources directory ?
Other then that, i don't think it is necessary anymore to use the include solution you presented in your code.
«
Last Edit: March 04, 2016, 03:38:16 pm by molly
»
Logged
apostleofchrist
New member
Posts: 21
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #2 on:
March 04, 2016, 03:42:12 pm »
Thank you for you reply molly.
It's not a RC version. It's the stable one. I did what I always do: I downloaded and installed it.
But the windres.exe is nowhere inside lazarus folder [C:\lazarus]
Could be something missing in the installer package? That's really odd.
Logged
molly
Hero Member
Posts: 2343
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #3 on:
March 04, 2016, 03:52:17 pm »
if you start your lazarus (select an new empty project) and select the menu-item: view/IDE internal/About FPC does it then show the correct Free Pascal version / directory for you ?
It could be that there is some residue left from an old installation somewhere (configuration file pointing to wrong location(s) or a path out of the ordinary).
Logged
apostleofchrist
New member
Posts: 21
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #4 on:
March 04, 2016, 04:23:25 pm »
Hey molly.
I've checked the configuration as you told, and this is what I found about FPC:
Code: Pascal
[Select]
Global IDE options
:
LazarusDirectory
=
Resolved LazarusDirectory
=
C
:
\lazarus\
Project
's CompilerFilename=$(CompPath)
Resolved Project'
s CompilerFilename
=
C
:
\lazarus\fpc\3
.
0
.
0\bin\x86_64
-
win64\fpc
.
exe
Default
CompilerFilename
=
C
:
\lazarus\fpc\3
.
0
.
0\bin\x86_64
-
win64\fpc
.
exe
Resolved
default
compilerFilename
=
C
:
\lazarus\fpc\3
.
0
.
0\bin\x86_64
-
win64\fpc
.
exe
CompilerMessagesFilename
=
Resolved CompilerMessagesFilename
=
C
:
\lazarus\components\codetools\fpc
.
errore
.
msg
But here's the thing: There weren't leftover from previous version, since I deleted the lazarus folder before doing a new instalation and during the instalation I checked the option which asks about cleaning any previous user configuration.
I've just searched the entire C: drive and have found two of these windres files. One is called i386-win32-windres and it is located in C:\lazarus\fpc\3.0.0\bin\x86_64-win64 and the other is called windres and it is located in C:\Program Files (x86)\CodeBlocks\MinGW\bin.
Which one is to be used and how do I tell the IDE to locate it?
Logged
molly
Hero Member
Posts: 2343
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #5 on:
March 04, 2016, 04:38:01 pm »
Ok, thanks for the research and reporting back.
I didn't know windres was named differently depending on the target (it isn't for my out of the ordinary platform targets).
The correct one should be the one located inside C:\lazarus\fpc\3.0.0\bin\x86_64-win64.
I have no idea why fpc/lazarus doesn't add the missing binutils prefix. Are you actually trying to cross-compile ? (windows 32 and 64 bit are two separate targets, afaik usually one cross compiles from a 32 bit installation to win64, not the other way around)
If all else fails, try to rename the .exe (or make a copy and rename that as windres.exe) and see if that at least compiles your example..
«
Last Edit: March 04, 2016, 04:39:37 pm by molly
»
Logged
apostleofchrist
New member
Posts: 21
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #6 on:
March 04, 2016, 04:45:00 pm »
Thank you for you help. I'll just remove and reinstall lazarus. Then I'll do what you told.
I'll report back to you soon.
Logged
molly
Hero Member
Posts: 2343
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #7 on:
March 04, 2016, 05:00:18 pm »
In case you opted for installing the 32-bit version of lazarus, then please don;t forget to install the 64 bit cross compiler from this link:
https://sourceforge.net/projects/freepascal/files/Win32/3.0.0/
You'd also need the Free Pascal 3.0 sources to be located inside your FPC directory, they can be found here:
https://sourceforge.net/projects/freepascal/files/Source/3.0.0/
(use the normal version, not the build version. .zip or .tar.gz depends on what you are able to extract)
In case you install the 64-bit version of lazarus and want to cross-compile 32 bit windows you'd also need to install this file here
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.6/
named Lazarus-1.6.0-fpc-3.0.0-cross-i386-win32-win64.exe
Either way: changing the target inside your project options then should select the proper locations and filename prefixes automatically for you. In case it doesn't then i suspect something to be amiss.
«
Last Edit: March 04, 2016, 05:10:00 pm by molly
»
Logged
Martin_fr
Administrator
Hero Member
Posts: 4553
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #8 on:
March 04, 2016, 05:09:17 pm »
Please see
http://bugs.freepascal.org/view.php?id=29698
i386-win32-windres comes with the 32 bit crosscompiler (it is probably not used, or wouldnt be if there was a proper named one)
Those tools are copied from the fpc svn. No idea why the windres is not included.
Logged
molly
Hero Member
Posts: 2343
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #9 on:
March 04, 2016, 05:12:33 pm »
ah, i see. thanks Martin_fr. I completely missed that
@apostleofchrist
Forget my ramblings, just install as you would like to and in case installing 64 bit version, use the files located at the link Martin_fr posted.
«
Last Edit: March 04, 2016, 05:14:04 pm by molly
»
Logged
apostleofchrist
New member
Posts: 21
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #10 on:
March 04, 2016, 05:31:43 pm »
Hello Martin. molly.
That's precisely my point. See, I did all steps as molly told me.
lazarus-1.6.0-fpc-3.0.0-win64 <- Install this one first.
lazarus-1.6.0-fpc-3.0.0-cross-i386-win32-win64 <- then this one.
The I installed ZeosLib, which I use in my project. No errors, installed just fine.
Then I renamed the i386-win32-windres to windres. Tried to build the project, it failed.
Here's the message.
Code: Pascal
[Select]
Warning
:
windres
:
preprocessing failed
.
epassdist
.
lpr
(
34
,
1
)
Error
:
Error
while
compiling resources
-
> Compile
with
-
vd
for
more details
.
Check
for
duplicates
.
Logged
molly
Hero Member
Posts: 2343
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #11 on:
March 04, 2016, 05:39:37 pm »
This time the error is slightly different ;-)
windres is located, but it seems that there is a resource related issue. Please use the windres from the bugreport though.
i would do as suggested and compile with -vd to see what is the culprit. Project options, compiler options, verbosity then on the right check mark the "show debug info" option and attempt to recompile (more information should be showed if not mistaken and would help pinpoint the issue)
Logged
Martin_fr
Administrator
Hero Member
Posts: 4553
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #12 on:
March 04, 2016, 06:28:34 pm »
Do you also have gcc and cpp? they are called by windres?
They are in the zip, on the issue I linked.
Logged
apostleofchrist
New member
Posts: 21
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #13 on:
March 04, 2016, 11:09:33 pm »
You know what? I'm just getting back to the previous version.
I don't have the time or the patience to fix these problems. I just want to install and use it, as I always did since the first version. Maybe in future releases, these bugs might be fixed.
Thank you all for your kindness and help.
Logged
apostleofchrist
New member
Posts: 21
Re: Error: resource compiler "windres.exe" not found, switching to external mode
«
Reply #14 on:
April 22, 2016, 06:03:00 pm »
Greetings Lazarus Team!
I'd like to know if there's a timetable for correcting Lazarus 1.6 installation issues, like this one I posted.
Thank you for listening.
Logged
Print
Pages: [
1
]
2
« previous
next »
Lazarus
»
Installation
»
Windows (32/64)
»
Error: resource compiler "windres.exe" not found, switching to external mode
Recent
Material Design
by
lainz
[
Today
at 03:12:09 pm]
Insert check mark symbol
by
exdatis
[
Today
at 03:08:44 pm]
how to disable directive
by
taazz
[
Today
at 02:56:07 pm]
Fpcupdeluxe
by
EMartin
[
Today
at 02:53:07 pm]
An advice - um conselho
by
hrayon
[
Today
at 02:43:40 pm]
macOS 32-bit app warning
by
Phil
[
Today
at 02:40:10 pm]
IDE output window shown, ...
by
Lyvia
[
Today
at 02:26:23 pm]
lazSubTitlesTranslator fo...
by
laguna
[
Today
at 12:41:07 pm]
Compiler can't find TPU f...
by
Thaddy
[
Today
at 12:26:46 pm]
[TCocoaMenuItem _setMenuO...
by
Renat.Su
[
Today
at 12:20:03 pm]