Board index » cppbuilder » brc32 does not bind my exe and res files

brc32 does not bind my exe and res files


2005-03-21 05:53:58 PM
cppbuilder76
OBJECT: brc32 does not bind my exe and res files.
First I would like to thank Borland for providing its C/C++ compiler 5.5 for free.
I cannot succeed in binding my exe and res files with the resource shell brc32. My c file compiles successfully with bcc32 and so does my rc file with brc32, but as soon as brc32 calls the linker to bind the exe and res files, everything stops: the last thing displayed is the linker banner and that's all; ilink32 does not seem to execute rlink32 since the rlink32 banner does not appear. I checked the exe file stamp and noticed it had not been modified by the linker, that is no resource was added. Nevertheless, the linker, called by brc32, tries to open the exe: I know it because I got an "unable to open xxx.exe" error message executing brc32 after moving the exe to another directory. I tried to turn on verbose switches for brc32 and ilink32 but it did not print anything else after the linker banner. I really cannot figure why brc32 does not bind the exe and res files. If I directly call the linker from the command line after creating the res file, it binds the exe and res files without any problem.
I would be grateful if you helped me.
Thanks in advance.
Regards,
Steph
 
 

Re:brc32 does not bind my exe and res files

I am confused. In the message you say that the compiled resource file
is not bound into the executable and later say that it is.
Binding a compiled resource file into an executable involves the use
of functions internal to Windows that may are be available on all
platforms or configurations. I strongly suggest that you bind the
compiled resource file to the executable by specifying it on the
command line at link time, with the command that uses ilink32.exe to
create the executable.
For example:
Windows GUI program
source files of 1.c and 2.cpp
resource file of 3.rc
target program name myprog.exe
bcc32 -c -W -v 1.c 2.cpp
brcc32 3.rc
ilink32 /Tpe/aa/Gn/x/c/v c0w 1 2,myprog,,import32 cw32,,3
. Ed
Quote
Steph wrote in message
news:423e99b6$ XXXX@XXXXX.COM ...

OBJECT: brc32 does not bind my exe and res files.

First I would like to thank Borland for providing its C/C++ compiler
5.5 for free.
I cannot succeed in binding my exe and res files with the
resource shell brc32. My c file compiles successfully with
bcc32 and so does my rc file with brc32, but as soon as
brc32 calls the linker to bind the exe and res files,
everything stops: the last thing displayed is the linker
banner and that's all; ilink32 does not seem to execute
rlink32 since the rlink32 banner does not appear. I checked
the exe file stamp and noticed it had not been modified by
the linker, that is no resource was added. Nevertheless, the
linker, called by brc32, tries to open the exe: I know it
because I got an "unable to open xxx.exe" error message
executing brc32 after moving the exe to another directory. I
tried to turn on verbose switches for brc32 and ilink32 but
it did not print anything else after the linker banner. I
really cannot figure why brc32 does not bind the exe and res
files. If I directly call the linker from the command line
after creating the res file, it binds the exe and res files
without any problem.

I would be grateful if you helped me.
 

Re:brc32 does not bind my exe and res files

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
I am confused. In the message you say that the compiled resource file
is not bound into the executable and later say that it is.

Binding a compiled resource file into an executable involves the use
of functions internal to Windows that may are be available on all
platforms or configurations. I strongly suggest that you bind the
compiled resource file to the executable by specifying it on the
command line at link time, with the command that uses ilink32.exe to
create the executable.

For example:
Windows GUI program
source files of 1.c and 2.cpp
resource file of 3.rc
target program name myprog.exe

bcc32 -c -W -v 1.c 2.cpp
brcc32 3.rc
ilink32 /Tpe/aa/Gn/x/c/v c0w 1 2,myprog,,import32 cw32,,3

. Ed

>Steph wrote in message
>news:423e99b6$ XXXX@XXXXX.COM ...
>
>OBJECT: brc32 does not bind my exe and res files.
>
>First I would like to thank Borland for providing its C/C++ compiler
>5.5 for free.
>I cannot succeed in binding my exe and res files with the
>resource shell brc32. My c file compiles successfully with
>bcc32 and so does my rc file with brc32, but as soon as
>brc32 calls the linker to bind the exe and res files,
>everything stops: the last thing displayed is the linker
>banner and that's all; ilink32 does not seem to execute
>rlink32 since the rlink32 banner does not appear. I checked
>the exe file stamp and noticed it had not been modified by
>the linker, that is no resource was added. Nevertheless, the
>linker, called by brc32, tries to open the exe: I know it
>because I got an "unable to open xxx.exe" error message
>executing brc32 after moving the exe to another directory. I
>tried to turn on verbose switches for brc32 and ilink32 but
>it did not print anything else after the linker banner. I
>really cannot figure why brc32 does not bind the exe and res
>files. If I directly call the linker from the command line
>after creating the res file, it binds the exe and res files
>without any problem.
>
>I would be grateful if you helped me.


Sorry if I was not clear: I meant that the resource shell brc32 compiled my rc file successfully, then called the linker, and stopped without linking the res and exe files. However, I succeeded in binding the res and exe files through ilink32, calling it directly from the command line. So my question was: why doesn't the resource shell brc32 bind the res and exe files after compiling the rc file as it is supposed to do according to the shipped documentation? I do not understand why brc32 actually does nothing more than brcc32.
Thanks for your precious help.
Regards, Steph.
 

{smallsort}

Re:brc32 does not bind my exe and res files

I already told you why. Read what I wrote again.
. Ed
Quote
Steph wrote in message
news:423ecf40$ XXXX@XXXXX.COM ...
 

Re:brc32 does not bind my exe and res files

"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote:
Quote
I already told you why. Read what I wrote again.

. Ed

>Steph wrote in message
>news:423ecf40$ XXXX@XXXXX.COM ...


I know you told me how to do it with ilink32 and I thank you for this, but you did not explain why the resource shell brc32 (not the resource compiler brcc32) does not bind the res and exe files, without me calling the linker explicitly from the command line, as it is supposed to do.
Sorry for annoying you again.
Regards, Steph.
 

Re:brc32 does not bind my exe and res files

You spoke of rlink.exe doing the work. As far as I know that is a
program for dealing with 16 bit executables does not come with C++
Builder be it the full version or just the command line tools.
The functions to update resoruces in an existing executable are
missing (I think they actually are in there as stubs) in some versions
of Windows such as Win95/98 and are limited if not hobbled in their
actions by later versions of Windows especially ones which have any
security patches.
The linker can put the resources in because when you link you are not
replacing resources in an existing executable. You are writing a file
which is a new executable.
. Ed
Quote
Steph wrote in message
news:423ef943$ XXXX@XXXXX.COM ...

>>Steph wrote in message
>>news:423ecf40$ XXXX@XXXXX.COM ...
>
>
I know you told me how to do it with ilink32 and I thank you for
this,
but you did not explain why the resource shell brc32 (not the
resource compiler brcc32) does not bind the res and exe files,
without me calling the linker explicitly from the command line, as
it is supposed to do.

Sorry for annoying you again.
Regards, Steph.
 

Re:brc32 does not bind my exe and res files

Well, all I told you is from the help file included in the free Borland C++ Builder 5.5 package, which provides, among other things, the compiler bcc32, the linker ilink32, the resource compiler brcc32, the resource linker (not an exe file, but a dll) rlink32.dll, and the resource shell brc32. Here's an extract from the help file:
Resource compiler
BRCC32.EXE is the Borland resource compiler. It compiles resource script files (.RC files) and produces the binary .RES file.
Resource linkers
RLINK32.DLL is the Borland resource linker that binds resources, in .RES file form, to an .EXE file, and marks the resulting .EXE file as a Windows executable. RLINK32.DLL is accessed through ILINK32.EXE.
Resource shells
BRC32.EXE is a shell through which BRCC32 and RLINK32 (through ILINK32) can be started in a single step.
My question, that is perhaps now of no importance because you told me how to do it with ilink32 at the command line prompt, is: why does not the resource shell call rlink32, through ilink32, as specified above, to link the res and exe files after compiling the rc file? Instead, it does just half the work it is assumed to do, that is compiling the rc file. The only site I've found so far concerning the problem can be reached through the following link:
www.winprog.org/tutorial/bcpp.html
Thanks for spending so much time with me,
regards, Steph.
 

Re:brc32 does not bind my exe and res files

Steph wrote:
Quote
The only site I've found so far concerning the problem can be reached through the following link:
www.winprog.org/tutorial/bcpp.html
Don't forget to visit Ed's site, probably the most valuable about the
free commandline tool:
users.deltacomm.com/edmulroy/howto.htm
Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
 

Re:brc32 does not bind my exe and res files

Michel Leunen < XXXX@XXXXX.COM >wrote:
Quote
Steph wrote:

>The only site I've found so far concerning the problem can be reached through the following link:
>www.winprog.org/tutorial/bcpp.html

Don't forget to visit Ed's site, probably the most valuable about the
free commandline tool:
users.deltacomm.com/edmulroy/howto.htm

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
www.leunen.com/
----------------------------------------
I know his site, he has already told me about it and indeed, it is very helpful and interesting.
Thanks for the tip,
regards, Steph.