Solved

How do you add a .RC to the project?

Posted on 2001-07-27
8
235 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:Richard Quadling
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:Richard Quadling
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:Richard Quadling
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6329900
listening...
0
 
LVL 8

Expert Comment

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

Author Comment

by:Richard Quadling
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:Richard Quadling
ID: 6336938
Thanks.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to fill array with TArray.Create? 14 87
Using idhttp to login to instagram 2 89
Firemonkey DbLookupComboBox equivalent ? 2 47
Twebbrowser add css to the header 3 24
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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