Author Topic: Win32 resources  (Read 5811 times)

Offline blr

  • Single posting newcomer
  • *
  • Posts: 3
Win32 resources
« on: June 07, 2015, 05:24:47 pm »
Hi,

I've created New Project for Win32 GUI application and I've added new resource file rs.rc with these lines:

#include <windows.h>

Background_Bmp RCDATA DISCARDABLE "bg.bmp"
Background_Region RCDATA DISCARDABLE "region.rgn"

When I've tried to rebuild project, windres.exe has aborted that with these error:

mingw32-g++.exe -Wall -g  -c C:\Users\PC\Desktop\test\main.cpp -o obj\Debug\main.o
windres.exe  -J rc -O coff -i C:\Users\PC\Desktop\test\test.rc -o obj\Debug\test.res
windres.exe: C:\\Users\\PC\\Desktop\\test\\test.rc:7: syntax error

When I open command line with this command:

C:\Users\PC\Desktop\test>windres -J rc -O coff -i C:\Users\PC\Desktop\test\test. rc -o obj\Debug\test.res

There's no problem..

What I doing wrong?

(Win7, MinGW64, i686-5.1.0-posix-dwarf-rt_v4-rev0)

Thank you

Online stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Win32 resources
« Reply #1 on: June 07, 2015, 05:58:53 pm »
C:\Users\PC\Desktop\test>windres -J rc -O coff -i C:\Users\PC\Desktop\test\test. rc -o obj\Debug\test.res

If you cut and pasted right, get rid of the space in the file extension or add the file extension of rc.

Tim S.
« Last Edit: June 07, 2015, 06:01:14 pm by stahta01 »
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 blr

  • Single posting newcomer
  • *
  • Posts: 3
Re: Win32 resources
« Reply #2 on: June 07, 2015, 07:34:01 pm »
I'm sorry, that isnt pasted right.

edit: I've tried same code to compile in masm32 and that's ok, I think problem is in settings of codeblocks
« Last Edit: June 07, 2015, 07:42:28 pm by blr »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Win32 resources
« Reply #3 on: June 07, 2015, 10:39:38 pm »
What options does masm32 use when it calls winres?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Win32 resources
« Reply #4 on: June 07, 2015, 11:34:35 pm »
Do you have any reason to believe that you are using the same windres.exe inside Code::Blocks and on the command line?

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 blr

  • Single posting newcomer
  • *
  • Posts: 3
Re: Win32 resources
« Reply #5 on: June 08, 2015, 08:59:48 pm »
You're probably right.. I've tried it at the work and it has run without problem... Where can I find the settings of windres path? Thank