Solved

How do you add a .RC to the project?

Posted on 2001-07-27
8
232 Views
Last Modified: 2010-04-06
Hi.

Looking inside a D5 project group, I see ...

#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = MyProg.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
MyProg.exe: MyProg.dpr
  $(DCC)


This all makes sort of sense.

I added my .RC file too it like this ...

#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = MyProg.exe Resources.res
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------

Resources.res: Resources.rc
  $(BRCC)

MyProg.exe: MyProg.dpr
  $(DCC)


When I load up the group, I get a message ...

Interface not supported.

Unable to create project Resources.rc. This project will be removed from the project group.

[OK]


Which it does when I click OK.


So, why does the project group have the BRCC directive if it cannot use it?

Or have I got the format wrong?

Regards,

Richard Quadling.
Carval Computing Ltd.
0
Comment
Question by:RQuadling
8 Comments
 

Expert Comment

by:meirchen
ID: 6326593
Have you compiled the .rc file to a .res file?  That's possible with the brcc32.exe.  I don't think delphi can use the normal .rc file if it's not compiled.
0
 
LVL 40

Author Comment

by:RQuadling
ID: 6326709
I CAN use BRCC32 from the command line, but why when the make file seems to know how to call that program?

I am going to try ...

#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = MyProg.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
MyProg.exe: MyProg.dpr
 $(ROOT)\bin\brcc32.exe resources.rc
 $(DCC)


And let you know.

I know asking questions and then providing my own answers doesn't win points, but asking them often helps others!

Regards,

Richard Quadling.
0
 
LVL 40

Author Comment

by:RQuadling
ID: 6326811
Ok.

Having FINALLY read the help (ha ha) ...

In the Project Manager, simply add the .RC file! DOH!

You get ...

program MyProg;

{%File 'Debug.inc'}
{$R 'Resources.res' 'Resources.rc'}


The Debug.inc file includes a list of debugs I may want. By having it in the file, It will be used as part of the build/make check!

The second part (resources.rc) is the plain text version for the list of resources.

This will build the .RES file automatically too.

So.

My answer to the question of "How do you add a .RC to the project?" is to go into the Project Manager and add the .RC file.

Some things are just a little TOO obvious sometimes!

Regards,

Richard Quadling.
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6329900
listening...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Expert Comment

by:TOndrej
ID: 6330178
yup add .rc to project not project group
0
 
LVL 40

Author Comment

by:RQuadling
ID: 6333481
What confused me the most was the lack of a "Resource Workshop" (I used to run Borland C++ with AFX for Win3.1x - those where the days!).

I couldn't quite understand who, with all the great things Delphi was doing, how it could not handle a list of resources.

So, sometimes (and only sometimes), reading the help/manual is beneficial!

0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 6334936
Hi RQuadling, after reviewing this question, I see that you did in fact answer it your self.  I will refund your points and accept my own comment @ 0 points to move to PAQ.

Thanks,
ComTech
Community Support Moderator
0
 
LVL 40

Author Comment

by:RQuadling
ID: 6336938
Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now