views:

419

answers:

2

Hi, everytime i write a resource file (.rc) and drop it over the bcc32.exe, nothin happens. if i drop it over rc.exe, it gives me a .res file, which doesnt work in delphi.

so what do i have to write in the .rc file, to get my .res built correctly at the bcc32? (example pls) lets say i wanna have abc.wav, which is on my desktop. thanks

+8  A: 

It's brcc32.exe that you want, not bcc32.exe.

That should produce your .res file for you.

However, you could also look into changing your {$R} directive slightly so that you don't need to manually compile your .rc file.

IIRC, you can use {$R yourfile.res yourfile.rc} in your source, and Delphi should compile the .rc for you.

Conor Boyd
This is a better answer than mine. I'll delete it.
Tim Jarvis
and the rc file isabc.wav c:\user\desktop\abc.wavso i just save this as a .rc and put it in my project's folder?the sourcecode, how does it have to be then? both,rc and res {$R lala.res lala. rc}or just the .rc ?by the way, thanks for your good answer, i didnt know that i can use .rc directly in delphi oOalex
Alex
Francois has already clarified some of this, but maybe this answer will help also:http://stackoverflow.com/questions/1298031/including-resource-file-in-a-project-by-rc-file-rather-than-res-file
Conor Boyd
+6  A: 

If you have D2007 or newer, just add your RC file to the project manager...

The RC file is a simple text file where you declare your resources and the corresponding files (with path if needed) like:

SANTA  BITMAP "SANTA.BMP"
SOUND  RCDATA "SOUND.WAV"

In D2009 or newer, you can just add the wav to the project manager.
And the easiest way to "add" is to drag your file and drop it there.

François
with this "add to project" window, inormally use for adding a new unit?
Alex
ah sry for doublepost, but i dont know how to write the .rc file yet. just name c:\...\....\abc.wav ?ill go to bed now, ty for your help, ill try it tomorrow
Alex
@alex, the .rc file is just a text file, containing 3 space delimited fields. The first is the internal name, the second is the type (RCDATA is a catch all type) and the third is the filename of the resource to compile.
skamradt
so:abc RCDATA "abc.wav"if the .rc is in the same folder like the wav?
Alex
@Alex, exactly.
skamradt