Author Topic: .rc: No such file or directory  (Read 10489 times)

Offline iainc

  • Single posting newcomer
  • *
  • Posts: 9
.rc: No such file or directory
« on: November 27, 2009, 03:02:09 pm »
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:

Code
-------------- 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
« Last Edit: November 27, 2009, 03:40:26 pm by iainc »

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: .rc: No such file or directory
« Reply #1 on: November 27, 2009, 04:16:42 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline iainc

  • Single posting newcomer
  • *
  • Posts: 9
Re: .rc: No such file or directory
« Reply #2 on: November 27, 2009, 06:36:47 pm »
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

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: .rc: No such file or directory
« Reply #3 on: November 27, 2009, 09:04:51 pm »
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++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline iainc

  • Single posting newcomer
  • *
  • Posts: 9
Re: .rc: No such file or directory
« Reply #4 on: November 30, 2009, 12:02:06 pm »
Quote
I 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:

Code
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...

Offline iainc

  • Single posting newcomer
  • *
  • Posts: 9
Re: .rc: No such file or directory
« Reply #5 on: November 30, 2009, 12:07:01 pm »
Quote
I'll try shortening the bits of the path that don't fit 8.3 format...

That didn't work...

Code
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.

Offline mraman

  • Single posting newcomer
  • *
  • Posts: 5
Re: .rc: No such file or directory
« Reply #6 on: November 30, 2009, 12:29:57 pm »
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

Offline iainc

  • Single posting newcomer
  • *
  • Posts: 9
Re: .rc: No such file or directory
« Reply #7 on: November 30, 2009, 12:49:31 pm »
Quote
PATH 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.