View previous topic :: View next topic |
Author |
Message |
StefanLi
Joined: 29 Mar 2006 Posts: 3
|
Posted: Thu Mar 30, 2006 5:41 am Post subject: building a D application with win32 resources |
|
|
I am using D to develop a simple Win32 application and I want to use Win32 resources (icons, strings, ..). I inserted
[code]version ( build ) { pragma( build, "boot.rc"); }[/code]
into the main D source file, added a rule definition file (default.rdf), looking like:
[code]----- Windows Resource Compiler -----
This uses ` pragma(/b'build', <sourcefile>.rc); `
-------------------------------------
rule=Resources
source=rc
target=res
tool=rcc.exe {@IN} -32 -r[/code]
While it seems that build recognises this all, it does not call rcc and it does not generate an entry within the .def file.
Any idea what went wrong? |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Thu Mar 30, 2006 8:55 am Post subject: Re: building a D application with win32 resources |
|
|
StefanLi wrote: | I am using D to develop a simple Win32 application and I want to use Win32 resources (icons, strings, ..). I inserted
Code: | version ( build ) { pragma( build, "boot.rc"); } |
into the main D source file, added a rule definition file (default.rdf), looking like:
Code: | ----- Windows Resource Compiler -----
This uses ` pragma(/b'build', <sourcefile>.rc); `
-------------------------------------
rule=Resources
source=rc
target=res
tool=rcc.exe {@IN} -32 -r |
While it seems that build recognises this all, it does not call rcc and it does not generate an entry within the .def file.
Any idea what went wrong? |
Because the documentation is wrong. The rule file should look like ...
Code: |
----- Windows Resource Compiler -----
This uses ` pragma('build', <sourcefile>.rc); `
-------------------------------------
rule=Resources
in=rc
out=res
tool=rcc.exe {@IN} -32 -r
|
_________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
StefanLi
Joined: 29 Mar 2006 Posts: 3
|
Posted: Thu Mar 30, 2006 11:41 pm Post subject: |
|
|
Nice! That does it!
And adding the -o switch for rcc in default.rdf it puts the *.res file into the correct folder, so that it get linked.
default.rdf is now:
[code]----- Windows Resource Compiler -----
This uses pragma( build , "<sourcefile>.rc"); `
-------------------------------------
rule=Resources
in=rc
out=res
tool=rcc.exe {@IN} -o{@OUT} -32 -r[/code]
Thanks! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|