Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
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
RE: simple .rc question
I thought rc-files where just for windows... but I can be wrong.
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
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
You must call createGUI() in the constructor of KMainWindow. If that doesnt't work, try
|
Source code
|
1
|
setXMLFile("testappui.rc");
|
before calling createGUI()
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
KDEDIRS did the trick.
thank you all for your help!!!
Cheers
O