Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using existing source files in KDevelop

873 views
Skip to first unread message

Matthew Peavy

unread,
Aug 17, 2003, 5:35:55 PM8/17/03
to
Hi all,

I am just getting started with KDevelop. [Looks great, by the way!]

I currently have a project that I'm developing in Visual Studio, which
resides on a Fat32 partition (mounted by Linux). I would love to be
able to continue developing it now in KDev. I am required to maintain
the Visual Studio project by my company. So I need to access all those
existing files, and modify them (ie I can't have 2 source trees
going). The project is a console project written in standard C++.

So I created a new KDev console project in my home directory. I
created a Hello World main file and built it. Things are looking good.

But when I tried to add existing files, it makes a copy of them in the
project directory. This is not what I'm looking for, as I would then
have 2 copies of each source file.

I also tried soft linking the files, but when I add them, KDevelop
says that the file doesn't exist.

Any suggestions here (and general comments about simultaneous Visual
Studio and KDev project development)?

Thanks a lot.
Matthew Peavy
www.mpeavy.com

Ransom

unread,
Aug 18, 2003, 10:19:01 AM8/18/03
to
Matthew Peavy wrote:

> Hi all,
>
> I am just getting started with KDevelop. [Looks great, by the
> way!]
>

Which version?

> I currently have a project that I'm developing in Visual Studio,
> which resides on a Fat32 partition (mounted by Linux). I would
> love to be able to continue developing it now in KDev. I am
> required to maintain the Visual Studio project by my company. So
> I need to access all those existing files, and modify them (ie I
> can't have 2 source trees going). The project is a console
> project written in standard C++.
>
> So I created a new KDev console project in my home directory. I
> created a Hello World main file and built it. Things are looking
> good.
>
> But when I tried to add existing files, it makes a copy of them
> in the project directory. This is not what I'm looking for, as I
> would then have 2 copies of each source file.
>
> I also tried soft linking the files, but when I add them,
> KDevelop says that the file doesn't exist.
>
> Any suggestions here (and general comments about simultaneous
> Visual Studio and KDev project development)?
>

With KDevelop 3.0 you can import existing projects without
duplicating the sources. Kdevelop just creates a project file in
the existing project directory.

HTH
Ransom

Matthew Peavy

unread,
Aug 18, 2003, 4:08:59 PM8/18/03
to
Ransom <ransomHA...@gmx.com> wrote in message news:<2394111.WMOnHDZI6A@pocaro>...

>
> With KDevelop 3.0 you can import existing projects without
> duplicating the sources. Kdevelop just creates a project file in
> the existing project directory.
>
> HTH
> Ransom

Thanks Ransom. I'm fairly new to Linux and have had problems
installing the 3.0 version. I went to the KDev site and found
instruction for a self-compile version.

I followed the instructions up to the point of typing "make", where I
get the error:

make: *** No targets specified and no makefile found. Stop.

I followed the steps on the KDev web site. At this step:

./configure --prefix=/usr/local/src/kde3src/kdevelop

I received an error stating that I did not have Berkeley DB installed.

Then I typed "make" and was told no targets specified.

Can anyone help out the new guy here?
Thanks a lot.
Matt.

Matt Gibson

unread,
Aug 18, 2003, 6:01:51 PM8/18/03
to
Matthew Peavy wrote:

>
> I received an error stating that I did not have Berkeley DB installed.

Well, that'll certainly stop you. If you have Berkeley DB installed, then
it's probably that your include/linker flags need pointing at it -- I had
that problem with building gideon. If you don't, then install it.

Have a look (with "locate", probably) and see if you've got libdb on your
system. Mine's in /usr/local/BerkeleyDB.4.1/lib. Yours is probably there
or in /usr/BerkeleyDB... if it exists.

If it is there, try doing this before you do the configure:

EXPORT CXXFLAGS =-L/usr/local/BerkeleyDB.4.1/lib
-I/usr/local/BerkeleyDB.4.1/include

(the above should be all on one line, obviously with the paths changed to
wherever the the Berkelely DB include and lib directories are on your
system.)

This will make sure that the configure process knows exactly where to find
Berkeley DB on your system. Basically what you're doing here is setting a
standard environment variable (CXXFLAGS is for C++ compiler flags) to tell
the C++ compiler that it should search for include (-I) and library (-L)
files in the specified places as well as everywhere it's already looking.

If you haven't got it installed, then I'm guessing you can probably get an
RPM for whatever distribution you're using -- it's probably sitting on a CD
right next to you -- but if not, then it's produced by SleepyCat, at
http://www.sleepycat.com, and you can download the source. It built
straight out of the box on my system.

> Then I typed "make" and was told no targets specified.

It's "configure" that creates the makefile. Configure (autoconf) is a tool
for building makefiles tailored specially to your system based on what
tools you have installed, and where they are. If it detects that the thing
you're trying to configure needs something that you don't have installed,
it'll stop and tell you, and not generate the makefile.

M

--
"It's the small gaps between the rain that count,
and learning how to live amongst them."
-- Jeff Noon

Matthew Peavy

unread,
Aug 19, 2003, 12:48:42 AM8/19/03
to
Matt Gibson <got...@gothick.org.uk> wrote in message news:<gvu711-...@codewave.demon.co.uk>...

Matt -

I got the Berkeley DB installed as you described, and this time
configure created a make file for me. So everything was looking
great(!). I typed make, and after about 10 minutes of making, I got
this error:

grep: /usr/lib/libfam.la: No such file or directory
/bin/sed: can't read /usr/lib/libfam.la: No such file or directory
libtool: link: `/usr/lib/libfam.la' is not a valid libtool archive
make[4]: *** [libkdevelopqextmdi.la] Error 1

Any suggestions?

Thanks for your help,
Matt.
www.mpeavy.com

Matt Gibson

unread,
Aug 19, 2003, 2:19:15 AM8/19/03
to
Matthew Peavy wrote:
>
> grep: /usr/lib/libfam.la: No such file or directory
> /bin/sed: can't read /usr/lib/libfam.la: No such file or directory
> libtool: link: `/usr/lib/libfam.la' is not a valid libtool archive
> make[4]: *** [libkdevelopqextmdi.la] Error 1

Strange. I guess configure didn't spot that. Anyway. FAM is a system
daemon that spots changes in filesystems. Programs use it, say, to keep an
eye on a directory and get informed when a new file appears there. See if
you can install the package "fam" for your distribution; this should
install "libfam.la".

Incidentally, whenever anything tells you you're missing "libXXX.la" or
"libXXX.so.something", it means the library for XXX is missing, so it's
worth just having a look to see if you have package XXX available.

Matthew Peavy

unread,
Aug 20, 2003, 3:27:57 PM8/20/03
to
Matt Gibson <got...@gothick.org.uk> wrote in message news:<44s811-...@codewave.demon.co.uk>...

> Matthew Peavy wrote:
> >
> > grep: /usr/lib/libfam.la: No such file or directory
> > /bin/sed: can't read /usr/lib/libfam.la: No such file or directory
> > libtool: link: `/usr/lib/libfam.la' is not a valid libtool archive
> > make[4]: *** [libkdevelopqextmdi.la] Error 1
>
> Strange. I guess configure didn't spot that. Anyway. FAM is a system
> daemon that spots changes in filesystems. Programs use it, say, to keep an
> eye on a directory and get informed when a new file appears there. See if
> you can install the package "fam" for your distribution; this should
> install "libfam.la".
>
> Incidentally, whenever anything tells you you're missing "libXXX.la" or
> "libXXX.so.something", it means the library for XXX is missing, so it's
> worth just having a look to see if you have package XXX available.
>
> M

Matt,

Ok. Now that is working. Thanks. So I compiled and got the
application to run. Almost.

Now, for the last question... The application cannot find some of the
libraries it needs for execution. As described in the KDev faq:

===============
Q: I compiled and installed gideon but all I see is a File and a Help
Menu?

A: Just as any other KDE application, you have to make sure that
KDevelop's plugins are recognized by KDE. Either install it into your
KDE directory (configure --prefix=/opt/kde3 for example) or add
gideon's path to your KDEDIRS environment variable and rerun
"kbuildsycoca". Example command line for bash (assuming gideon is
installed in /home/harry/gideon):
export KDEDIRS=/home/harry/gideon:$KDEDIRS && kbuildsycoca
================

So I used the export command as stated above. And kbuildsycoca runs.
And then I try to execute KDev and I get the same error message.
Copied from shell:

[matthew@localhost src]$ ls gideon
gideon*
[matthew@localhost src]$ pwd
/usr/local/src/kde3src/kdevelop/src
[matthew@localhost src]$ export
KDEDIRS=/usr/local/src/kde3src/kdevelop/src:$KDEDIRS && kbuildsycoca
kbuildsycoca running...
[matthew@localhost src]$ gideon
bash: gideon: command not found
[matthew@localhost src]$ bash gideon

and then I get an error dialog say that KDevelop was unable to find
plugins.

What could I be doing wrong with the export command? I am using Bash.
Hmmm.

If that doesn't work, should I re-run configure, re-run make, and make
install? My question then is where to set the directory for kde. I
have a /usr/lib/kde3 directory, but no other kde3 directories. I
also have a /usr/share/mdk/kde directory.

Thanks again,
Matt.

Ransom

unread,
Aug 21, 2003, 8:48:08 AM8/21/03
to
Matthew Peavy wrote:

<snip>


> If that doesn't work, should I re-run configure, re-run make,
> and make
> install? My question then is where to set the directory for
> kde. I
> have a /usr/lib/kde3 directory, but no other kde3 directories.
> I also have a /usr/share/mdk/kde directory.
>

kde-config --prefix tells you the compiled in prefix for your kde
libraries. Run kde-config --help for further options.

HTH,
Ransom

Matt Gibson

unread,
Aug 21, 2003, 1:08:16 PM8/21/03
to
Matthew Peavy wrote:

> Ok. Now that is working. Thanks. So I compiled and got the
> application to run. Almost.

Okay, nearly there then!

> Q: I compiled and installed gideon but all I see is a File and a Help
> Menu?
>
> A: Just as any other KDE application, you have to make sure that
> KDevelop's plugins are recognized by KDE. Either install it into your
> KDE directory (configure --prefix=/opt/kde3 for example) or add
> gideon's path to your KDEDIRS environment variable and rerun
> "kbuildsycoca". Example command line for bash (assuming gideon is
> installed in /home/harry/gideon):
> export KDEDIRS=/home/harry/gideon:$KDEDIRS && kbuildsycoca

Well, I haven't come across this problem, but what the FAQ answer is
bascially saying is that gideon hasn't been installed into you normal KDE
directory. Here's some questions:

Did you use a "--prefix" option when you configured?
Did you actually do "make install" to put it in the right place? (You'll
need to be running as root to install.)

> And then I try to execute KDev and I get the same error message.
> Copied from shell:
>
> [matthew@localhost src]$ ls gideon
> gideon*
> [matthew@localhost src]$ pwd
> /usr/local/src/kde3src/kdevelop/src
> [matthew@localhost src]$ export
> KDEDIRS=/usr/local/src/kde3src/kdevelop/src:$KDEDIRS && kbuildsycoca
> kbuildsycoca running...
> [matthew@localhost src]$ gideon
> bash: gideon: command not found

Right. Here's a pointer to the fact that gideon's not in your path, which
would mean that it's not been installed into whatever your $KDEDIR/bin
directory is. First off, what does "echo $KDEDIR" tell you?

> [matthew@localhost src]$ bash gideon

If you want to run an executable from your current directory, use "./gideon"
-- Linux isn't like Windows; if "." isn't in your PATH, then it won't try
to execute things in your current directory unless you tell it to. This is
a security feature to stop you running things accidentally.

> What could I be doing wrong with the export command? I am using Bash.
> Hmmm.

Well, I'm not sure you're lookin in the right place. Basically,
kbuildsycoca has to find the plugins for gideon, and I'm not sure they're
in the src directory. From the look of the FAQ answer, you might want to
try:

KDEDIRS=/usr/local/src/kde3src/kdevelop:$KDEDIRS && kbuildsycoca

...but I'm not too sure about that.

> If that doesn't work, should I re-run configure, re-run make, and make
> install? My question then is where to set the directory for kde. I
> have a /usr/lib/kde3 directory, but no other kde3 directories. I
> also have a /usr/share/mdk/kde directory.

Well, hang on, where are you running KDE from? I'm a little confused about
how your system's set up. I think we need to know at least what your
$KDEDIR is set to...

Cheers,

Matthew Peavy

unread,
Aug 22, 2003, 1:40:26 PM8/22/03
to
Matt Gibson <got...@gothick.org.uk> wrote in message news:<1taf11-...@codewave.demon.co.uk>...

>
> Well, I haven't come across this problem, but what the FAQ answer is
> bascially saying is that gideon hasn't been installed into you normal KDE
> directory. Here's some questions:
>
> Did you use a "--prefix" option when you configured?

Yes, but it may not have been to the correct directory. I believe I
put --prefix=/usr/lib/kde3

There is a /usr/lib/kde3 directory.

> Did you actually do "make install" to put it in the right place? (You'll
> need to be running as root to install.)

I type "make install" within the kdevelop directory, as root.

> Right. Here's a pointer to the fact that gideon's not in your path, which
> would mean that it's not been installed into whatever your $KDEDIR/bin
> directory is. First off, what does "echo $KDEDIR" tell you?

It doesn't report back anything, for user "matthew" or for root.

> > [matthew@localhost src]$ bash gideon
>
> If you want to run an executable from your current directory, use "./gideon"
> -- Linux isn't like Windows; if "." isn't in your PATH, then it won't try
> to execute things in your current directory unless you tell it to. This is
> a security feature to stop you running things accidentally.

Thanks. I just read about that last night, too. The little
differences...

> > What could I be doing wrong with the export command? I am using Bash.
> > Hmmm.
>
> Well, I'm not sure you're lookin in the right place. Basically,
> kbuildsycoca has to find the plugins for gideon, and I'm not sure they're
> in the src directory. From the look of the FAQ answer, you might want to
> try:
>
> KDEDIRS=/usr/local/src/kde3src/kdevelop:$KDEDIRS && kbuildsycoca

I get the following:

[root@localhost kde3]#
KDEDIRS=/usr/local/src/kde3src/kdevelop:$KDEDIRS && kbuildsycoca
Warning: kbuildsycoca is unable to register with DCOP.
kbuildsycoca running...

and then the usual error when trying to execute gideon.

And now the echo $KDEDIRS reports back the path to kdevelop that I
just set.

> > If that doesn't work, should I re-run configure, re-run make, and make
> > install? My question then is where to set the directory for kde. I
> > have a /usr/lib/kde3 directory, but no other kde3 directories. I
> > also have a /usr/share/mdk/kde directory.

> Well, hang on, where are you running KDE from? I'm a little confused about
> how your system's set up. I think we need to know at least what your
> $KDEDIR is set to...

I think this all extends from MY confusion on how my system is set up.
I don't know exactly where KDE is running from. I am using a normal
(default) install from Mandrake 9.1.

Here is what I find in /usr when searching for kde directories:

[matthew@localhost usr]$ find -type d -name kde*
./lib/kde3
./local/src/kde3src
<< all the rest of the kde3src sub-directories >>
./share/doc/HTML/en/kdesu
<< many more doc/HTML sub-directories >>>
./share/mdk/kde
./share/apps/kdewizard
./share/apps/kdeprintfax
./share/apps/kdeui
./share/apps/kdewidgets
./share/apps/kdegames
./share/apps/kdeprint_part
./share/apps/kdeprint
./share/apps/kdesktop
./share/apps/kdevelop
./share/icons/kdeclassic
./share/mimelnk/kdedevice
./share/services/kded
./include/kdesu
./include/kdeprint

If I can recompile and get the paths correct, that would be fine with
me. I am just not sure I am using the correct paths.

Thanks again (and again, and again),

Matt.
www.mpeavy.com

Matthew Peavy

unread,
Aug 22, 2003, 1:47:30 PM8/22/03
to

Ransom,

I get the following:

[matthew@localhost src]$ kde-config --prefix
/usr

According to the KDevelop instruction for, I need:

$export KDEDIR=/where/your/kde3/is

So does this mean setting KDEDIR=/usr
??

I set it to KDEDIR=/usr/lib/kde3

Matt.

Matt Gibson

unread,
Aug 22, 2003, 2:31:23 PM8/22/03
to
Matthew Peavy wrote:

>> Did you use a "--prefix" option when you configured?
>
> Yes, but it may not have been to the correct directory. I believe I
> put --prefix=/usr/lib/kde3

Well, that seems a little unusual, but then different distributions put it
in different places. What distribution are you using, and how did you
install KDE?

The "KDE directory", which is usually held in KDEDIR, is for the base
directory of your KDE installation. Virtually the whole of KDE resides in
subdirectories below that directory. So. Let's do a sanity check.

I know you were running kbuildsycoca earlier, so let's find out where from.
What does "which kbuildsycoca" tell you? On my system, it's
/usr/local/kde/bin/kbuildsycoca, which indicates that my KDE directory is
/usr/local/kde.

> There is a /usr/lib/kde3 directory.

Does it have the standard KDE directories underneath it? i.e. bin, etc,
include, info, lib, and so on? /usr/lib seems a bit of a strange place for
it.

> I type "make install" within the kdevelop directory, as root.

Good.

> Warning: kbuildsycoca is unable to register with DCOP.

That's unusual. Are you running kbuildsyscoca as the same user that you're
logged into KDE as?

> I think this all extends from MY confusion on how my system is set up.
> I don't know exactly where KDE is running from. I am using a normal
> (default) install from Mandrake 9.1.

Oh, okay.

> Here is what I find in /usr when searching for kde directories:

Perhaps, just perhaps, it's not in /usr. For example, on my SuSE system,
it's installed into /opt by default. The "which" command above will tell
you ("which <command>" locates the file that would be run if you just type
<command>, by the way.)

> If I can recompile and get the paths correct, that would be fine with
> me. I am just not sure I am using the correct paths.

I think that's probably it. It's possible that not providing the "--prefix"
option to configure would leave configure to correctly work out where your
KDE is installed; configure's quite good at working these things out for
itself. On the other hand, that might rely on you having your KDEDIR
environment variable set. I'm really surprised that it's not set, by the
way. Most distributions will set it up for you if you've got KDE
installed.

> Thanks again (and again, and again),

No worries. I really couldn't begin to count the number of people that
helped me out when I was just starting out with this stuff...

Ransom

unread,
Aug 23, 2003, 9:59:21 AM8/23/03
to
Matthew Peavy wrote:

> I get the following:
>
> [matthew@localhost src]$ kde-config --prefix
> /usr
>
> According to the KDevelop instruction for, I need:
>
> $export KDEDIR=/where/your/kde3/is
>
> So does this mean setting KDEDIR=/usr
> ??
>
> I set it to KDEDIR=/usr/lib/kde3
>

It seems MDK is screwing up the kde defaults like RH does. They
simply ignore /usr/local or /opt. Anyway, yes --prefix would be
/usr but with a grain of salt in it: Like Matt said in a
previous post, you need the correct directory structure which you
don't have( e.g. /usr/lib/kde3 does not fit into the scheme). So
why don't you try KDEDIR=/usr and
KDEDIRS=$KDEDIR:$KDEDIR/lib/kde3 etc.? I think that was the main
reason for introducing KDEDIRS in first place.

HTH
Ransom

0 new messages