News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Error windress can't popen

Started by mario_mc, August 05, 2013, 10:45:57 AM

Previous topic - Next topic

mario_mc

I have different problem which i hasn't found on the forums or guides.
after installing code :: block with MinGW and compile wxWidegets2.9.5 using:
SHARED=1 
MONOLITHIC=1 
UNICODE=1
when I create new project following by instruction
everything's fine but when i run and build project it appear a error:
windres.exe: can't popen `gcc -E -xc -DRC_INVOKED -ID:\wxWidgets-2.9.5\include -ID:\wxWidgets-2.9.5\lib\gcc_dll\mswu D:MyProject\test\resource.rc': No such file or directory
I have no idea what is causes problem please help

Reply

stahta01

#1
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

FYI: We here have no idea why you will NOT post the information requested in the link posted twice for you.

Posting a full re-build log would likely help us to help you.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PinkPanther

Hello, All ( and exclusively stahta01).

I am running Code::Blocks  ver. 12.11 Build: Nov 25 2012, 09:32:38 - wx2.8.12 (Windows, unicode - 32bit)
on WindowsXP Pro 2002 SP3. The compiler I use is MinGW ver. 4.7.1
(http://garr.dl.sourceforge.net/project/codeblocks.berlios/codeblocks-12.11mingw-setup_user.exe)

When I build new project ( File -> New -> Project -> Win32 GUI project -> Dialog based -> ... -> Build) 
I see next
"-------------- Build: Debug in Dialog (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall  -g     -c D:\pjx\CB\Dialog\main.cpp -o obj\Debug\main.o
windres.exe  -J rc -O coff -i D:\pjx\CB\Dialog\resource.rc -o obj\Debug\resource.res
windres.exe: can't popen `gcc -E -xc -DRC_INVOKED  D:\pjx\CB\Dialog\resource.rc': No such file or directory
Process terminated with status 1 (0 minutes, 6 seconds)
1 errors, 0 warnings (0 minutes, 6 seconds)
"
No additions, no deletions in any project files.

Frame based Win32 GUI projects built successfully.

With best wishes...

stahta01

#3
Works for me.


-------------- Build: Debug in TestWinGUI (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall  -g     -c V:\SourceCode\CBProjects\TestProjects\TestWinGUI\main.cpp -o obj\Debug\main.o
windres.exe  -J rc -O coff -i V:\SOURCE~1\CBPROJ~1\TESTPR~1\TESTWI~2\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe  -o bin\Debug\TestWinGUI.exe obj\Debug\main.o  obj\Debug\resource.res   -lgdi32 -luser32 -lkernel32 -lcomctl32
Output size is 32.63 KB


Your MinGW Compiler installation is likely missing "gcc.exe".

I am testing on Windows 7 32-bit and CB 12.11 using MinGW that came with  CB 12.11.

What I get on Windows 7 if gcc.exe does NOT exist.


mingw32-g++.exe -Wall  -g     -c V:\SourceCode\CBProjects\TestProjects\TestWinGUI\main.cpp -o obj\Debug\main.o
windres.exe  -J rc -O coff -i V:\SOURCE~1\CBPROJ~1\TESTPR~1\TESTWI~2\resource.rc -o obj\Debug\resource.res
'gcc' is not recognized as an internal or external command,
operable program or batch file.
windres.exe: preprocessing failed.


For anymore help from me; I need your CB Tool chain setting value for Compiler Installation Directory.
My guess is it is NOT using the correct MinGW GCC.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PinkPanther

Compiler settings -> Global compiler settings -> Toolchain executables -> Compiler's installation directory = D:\CodeBlocks\MinGW
If "D:\CodeBlocks\MinGW" is NOT correct MinGW GCC then what is more correct?

stahta01

#5
Quote from: PinkPanther on August 12, 2013, 06:55:45 PM
Compiler settings -> Global compiler settings -> Toolchain executables -> Compiler's installation directory = D:\CodeBlocks\MinGW
If "D:\CodeBlocks\MinGW" is NOT correct MinGW GCC then what is more correct?

Does the file D:\CodeBlocks\MinGW\bin\gcc.exe exist?

Edit: If it does exist what does the below in a cmd.exe window give


cd /d D:\CodeBlocks\MinGW\bin
gcc.exe -v


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PinkPanther


stahta01

What does the below in a cmd.exe window give


cd /d D:\CodeBlocks\MinGW\bin
gcc.exe --version


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PinkPanther

Of course
"D:\CodeBlocks\MinGW\bin>gcc --version
gcc.EXE (tdm-1) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
"

stahta01

#9
Try this command and see if it works on the CMD.exe


gcc -E -xc -DRC_INVOKED  D:\pjx\CB\Dialog\resource.rc


You will likely need to be in the "D:\CodeBlocks\MinGW\bin" folder or add it to your system path.

If it works or fails try this below commands


SET PATH=D:\CodeBlocks\MinGW\bin;%PATH%
cd /d D:\pjx\CB\Dialog

mingw32-g++.exe -Wall  -g     -c D:\pjx\CB\Dialog\main.cpp -o obj\Debug\main.o
windres.exe  -J rc -O coff -i D:\pjx\CB\Dialog\resource.rc -o obj\Debug\resource.res


If the above works, it implies a problem in Code::Blocks.
If it fails, it implies a Compiler related issue. Compiler Installation or conflict issue being most likely.

Edit: If it fails, you should verify D:\pjx\CB\Dialog\resource.rc exists before thinking it is a compiler issue.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PinkPanther

"gcc -E -xc -DRC_INVOKED  D:\pjx\CB\Dialog\resource.rc" returns many lines, no errors.

After "set path" and "cd d:\..."
"mingw32-g++.exe -Wall  -g     -c D:\pjx\CB\Dialog\main.cpp -o obj\Debug\main.o" returns no message, obj\Debug\main.o file appears.
"windres.exe  -J rc -O coff -i D:\pjx\CB\Dialog\resource.rc -o obj\Debug\resource.res" returns no message, obj\Debug\resource.res file appears.

What is my next step?

stahta01

#11
Quote from: PinkPanther on August 12, 2013, 07:49:01 PM
"gcc -E -xc -DRC_INVOKED  D:\pjx\CB\Dialog\resource.rc" returns many lines, no errors.

After "set path" and "cd d:\..."
"mingw32-g++.exe -Wall  -g     -c D:\pjx\CB\Dialog\main.cpp -o obj\Debug\main.o" returns no message, obj\Debug\main.o file appears.
"windres.exe  -J rc -O coff -i D:\pjx\CB\Dialog\resource.rc -o obj\Debug\resource.res" returns no message, obj\Debug\resource.res file appears.

What is my next step?

I really have no idea; I might try a prior version of Code::Blocks (8.?? or 10.??) or a current nightly and see if the problem still exists in CB.

I am guessing a CB and Windows XP related bug.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

#12
I have a possible work around; but, it may or may not work.

Changing adv compiler options did NOT work for me.

But, changing tool chain exe for resource compiler did seem to work it was "windres.exe" I changed it to "windres.exe --use-temp-file"
This might fix it under windows XP; but, it is just a guess.

I am hoping that it is a popen and windows XP caused CB related bug. The option "--use-temp-file" stops the use of popen in the windres call.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

PinkPanther

Yes, adjustment  "windres.exe" to "windres.exe --use-temp-file" fix it.
Thank you very much.

PS: But it's so regretable...

robertkendrick

Hi there.

Nice product.

I had this same problem as above with windres (xxx.rc no such file or directory). Using 12.11 and combined MinGW.

After trying moving MinGW (for no spaces) and using GCC command in advanced build for the individual rc file (without success) I found that editing the toolchain in settings->compiler from:
windress
to
windress -v

also appears to fix the problem (and still uses popen ??).

I HAVE NO IDEA WHY -- but thought it may help to track down the bug.

regards