News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

.rc: No such file or directory

Started by iainc, November 27, 2009, 03:02:09 PM

Previous topic - Next topic

iainc

Hi,

I'm running through the wxSmith tutorial at:  http://wiki.codeblocks.org/index.php?title=WxSmith_tutorial:_Hello_world

And everything seems to be going fine until I try a compilation, i.e the last few lines before: http://wiki.codeblocks.org/index.php?title=WxSmith_tutorial:_Hello_world#Let.27s_add_some_fireworks

At that point rather than seeing a nice clean build, I instead get:

-------------- Build: Debug in hellowin ---------------

windres.exe -i C:\CODE-B~1\hellowin\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\SourceCode\Libraries\wxWidgets2.8\include -IC:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_dll\mswud
gcc: C:CODE-B~1hellowinresource.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
windres: preprocessing failed.
Process terminated with status 1 (0 minutes, 5 seconds)
0 errors, 1 warnings


This is on a Win XP SP3 machine.  Strangely on a machine on which I installed all the same packages and configuration (side-by-side install) everything works fine (albeit this is a Vista machine).  Why is one installation creating all the required files and the other not?  I don't understand what I've done wrong given that I'm sure that I set up both machines identically!

Iain

stahta01

IIRC, the version of windres and Code::Blocks contributed to this problem.
What are both versions?

Also, what is the version of gcc?

Note, one issue was the folder being called "rc" with some of the above;
renaming it "./rc" or ".\rc" solved that issue.
A different windres issue (not being caused by Code::Blocks) is having spaces/special characters in file path.

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]

iainc

Hi,

Thanks,

C::B: 8.02

GNU windres (GNU Binutils) 2.18.50.20080109

gcc (GCC) 4.2.1-dw2 (mingw32-2)

The path of the project is: C:\code-blocks\hellowin\

But as I say this is all identical across the two machines - I've even tried a complete uninstall of C::B and wxPack (including registry clean and deleting the relevant "Application data" folders), just in case I'd managed to corrupt something subtly during/just after installation.

Iain

stahta01

I suggest posting the full compiler build log for both and seeing how it differs.

NOTE: Vista changed a lot of long file naming operations. Since you are NOT using DOS 7.3 file folder names it might be the difference.

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]

iainc

QuoteI suggest posting the full compiler build log for both and seeing how it differs.

Thanks - the log in the HTML file though is pretty much what's in my first post - even with "full command line" logging enabled:

Build started on: 30-11-2009 at 10:51.23
Build ended on: 30-11-2009 at 10:51.23

-------------- Build: Debug in hellowin ---------------
windres.exe -i C:\CODE-B~1\hellowin\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\SourceCode\Libraries\wxWidgets2.8\include -IC:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_dll\mswud
gcc: C:CODE-B~1hellowinresource.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
windres: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 1 warnings


I'll try shortening the bits of the path that don't fit 8.3 format...

iainc

QuoteI'll try shortening the bits of the path that don't fit 8.3 format...

That didn't work...

Build started on: 30-11-2009 at 10:56.33
Build ended on: 30-11-2009 at 10:56.33

-------------- Build: Debug in hellowin ---------------
windres.exe -i C:\codeblks\hellowin\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\SourceCode\Libraries\wxWidgets2.8\include -IC:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_dll\mswud
gcc: C:codeblkshellowinresource.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
windres: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 1 warnings


Unfortunately my Vista machine is at home now so I won't be able to get to it for about 12 more hours.  When I do I'll post a log though.

mraman

this (strange and uncorrected for long) problem happens if your windres.exe is in a path that has spaces in it - such as "c:\program files\x\bin\windres.exe".
move windres.exe to a path that does not have a space or other special characters and add that directory to your PATH environment variable

iainc

QuotePATH environment variable

We have a winner!  On the XP machine I also have Cygwin installed (unlike on the Vista m/c).  I just realised that since CygWin also has a windres.exe, a quick change of PATH order was required to alter the folder search order, everything now builds just fine.

I knew it'd turn out to be that I'd not done something basic!

Thanks for your help guys.