You are not logged in.

1

Wednesday, June 23rd 2004, 9:38pm

simple .rc question

Hi

Can anyone please explain to me where the .rc file should reside and what environment variable or setting determines where the application looks for the .rc file.

The problem I am having is with kdevelop 3 that gives an error of "cannot find .rc file..." at runtime and I cannot figure out where it needs to be.

Thanks in advance
O

e8johan

Beginner

Posts: 27

Location: Sweden

  • Send private message

2

Thursday, June 24th 2004, 6:31am

RE: simple .rc question

I thought rc-files where just for windows... but I can be wrong.

f_edemar

Beginner

Posts: 14

Location: Sweden

  • Send private message

3

Thursday, June 24th 2004, 8:11am

RE: simple .rc question

The rc-files should be put in $(kde_datadir)/PROGRAM_NAME. You can use a makefile to copy your local rc-file when you run "make install". To solve you problem, you probably just have to run "make install" so KDE can find the file.

You can read more about XMLGUI. here:
http://developer.kde.org/documentation/l…rch/xmlgui.html

4

Thursday, June 24th 2004, 11:38am

Hi f_edemar

I have done what you suggested but the application still can't find the .rc file.

I ran "make install" and it put the binary in the "/usr/local/kde/bin" directory and also created a directory under "/usr/local/kde/share/apps/" for the applications (as per the kde_datadir in the Makefile) and the .rc file has also been copied into that directory.

In summary :
/usr/local/kde/bin/testapp
/usr/local/kde/share/apps/testapp/testappui.rc

How can I trace where the application is looking for the .rc file

Thank
O

f_edemar

Beginner

Posts: 14

Location: Sweden

  • Send private message

5

Thursday, June 24th 2004, 11:56am

You must call createGUI() in the constructor of KMainWindow. If that doesnt't work, try

Source code

1
setXMLFile("testappui.rc");
before calling createGUI()

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

6

Thursday, June 24th 2004, 11:56am

Do you have /usr/local/kde in your KDEDIRS environment variable?

KDEDIRS is a list of KDE directory roots, where its framework can look for data, configuration, libraries, etc.

For example on my system there are three such directories:
/usr - where the distribution installed KDE
/usr/local - where I install source packacges
/usr/local/kde - where I install my programs currently under development.

My KDEDIRS environment variable looks like this
KDEDIRS=/usr/local/kde:/usr/local:/usr

Cheers,
_
Qt/KDE Developer
Debian User

7

Thursday, June 24th 2004, 10:40pm

KDEDIRS did the trick.

thank you all for your help!!!

Cheers
O