Author Topic: [ProjectName]resource.rc: No such file or directory  (Read 324 times)

Offline rmd06

  • Single posting newcomer
  • *
  • Posts: 2
[ProjectName]resource.rc: No such file or directory
« on: May 04, 2019, 09:27:47 am »
1. I installed CodeBlocks 17.12 on the path (D:\GreenSoft\CodeBlocks)
2. Add the “D:\GreenSoft\CodeBlocks\MinGW\bin” to the path environment variable.
3. Download the wxWidgets3.1.2 source code to “D:\GreenSoft\wxWidgets\wxWidgets312\”
4. cd to “D:\GreenSoft\wxWidgets\wxWidgets312\build\msw”, and run command:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport

5. After compile finished, I run the OpenBlocks and add a project wxWidget with several options:
   wxWidgets 3.1.*
   Project Title: App
    Prefered GUI builder: wxSmith
   Application type: frame-based
   wxWidgets location: D:\GreenSoft\wxWidgets\wxWidgets312
   Compiler: GUN GCC compiler
   Create Debug…
   Create Release…
   With three wxWidgets Library settings checked only
6. Then an empty GUI panel appeared in CodeBlocks.
7. I do nothing but click the compile button, and error appeared:

It says that gcc: error: D:QMDownloadrmdCsrrresource.rc: No such file or directory
But I checked that the file D:\QMDownload\rmdCs\App\resource.rc exist , and its textcontent is:
aaaa ICON "wx/msw/std.ico"

#include "wx/msw/wx.rc"

I have found a post with the same issue and make sure that no blank space and special character exist in all the paths, but the problem still exist.

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

windres.exe -ID:\GreenSoft\wxWidgets\wxWidgets312\include -ID:\GreenSoft\wxWidgets\wxWidgets312\lib\gcc_dll\mswu  -J rc -O coff -i D:\QMDownload\rmdCs\App\resource.rc -o obj\Debug\resource.res
x86_64-w64-mingw32-g++.exe -LD:\GreenSoft\wxWidgets\wxWidgets312\lib\gcc_dll -o bin\Debug\App.exe obj\Debug\AppApp.o obj\Debug\AppMain.o  obj\Debug\resource.res -mthreads  -lwxmsw31u -mwindows
gcc: error: D:QMDownloadrmdCsAppresource.rc: No such file or directory
gcc: warning: '-x c' after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
windres: preprocessing failed.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 1 warning(s) (0 minute(s), 0 second(s))
 
« Last Edit: May 04, 2019, 09:32:17 am by rmd06 »

Offline rmd06

  • Single posting newcomer
  • *
  • Posts: 2
Re: [ProjectName]resource.rc: No such file or directory
« Reply #1 on: May 04, 2019, 02:54:49 pm »
After two days of struggle, all the reason is the Toolchain Executables. I finally found that it was cygwin's path! After I change to D:\GreenSoft\CodeBlocks\MinGW, it compiles ok now!

I think the problem take place at the install step: codeblocks detect everywhere on your PC to find a existing gcc, and let you choose one as your favorite. It even forgot that the installer is already bundled with a minGW!, and it does not show where the detected gcc are located! So if you simply confirm one and not to confirm which gcc it was in the Toolchain Executables, it may abandon the bundled minGW and use another wrong one instead.
« Last Edit: May 04, 2019, 02:56:47 pm by rmd06 »