c and kdevelop
I know this subject doesn't really fit here but I'll try it anyway.
I'm trying to start a C project with KDevelop using by opening a new project, select a C "hello world program". After selecting the right projectdirectory from where the project will be built I get a nice simple hello program with gnu automake.
Well, everything looks fine. But I want to add some source, so I started to create a directory "include" and add a xxx.h file in it. Now here comes the drama for me. If I want to build the project, it keeps complaining about a xxx.h doesn't exist. I tried #include "xxx.h" as well as #include <xxx.h> I checked the automake.am and it seems not filled the right way I suppose. In another C project I imported once, it works well and in the automake.am it has noinst_HEADER = blabla.h blabla2.h ....
The one I have has _SOURCE = xxx.h I assume it should be something like noinst_HEADER = xxx.h Tried that out, and still have the smame issue.
And though I love opensource and KDevelop is opensource, it really hurts in my heart to not having a simple thing done. The docs isn't complete, I can't post on a kdevelop forum as I can't subscribe, I'm totally lost.
I hope someone is able to help me out here, thanks!
I don't use kdevelop, but I've used autotools a little bit. What works for me in this regard is to put *all* source code in a subdirectory, src/, then in the top level Makefile.am:
Then you have to have another Makefile.am in src/ with a line like this:
Of course, all those must actually be in src/, and you still need #include "myproj.h" in myproj.c, etc. What the files are called doesn't matter, but the prefix to _SOURCES should be the executable name.
myproj_SOURCES = myproj.c myproj.h bonus.h
You are right, autotools is poorly documented and not so easy to use. IMO, tho, there is no reason to do so unless you want to produce a configurable package, eg for distribution. It is much simpler to just use gcc on the command line while developing, etc, and AFAIK there is not much purpose to a makefile on small personal projects, nor is it necessary.
Thnx for your response,
I agree with you, but as you might know, I don't want to stick to small projects. There will be a time you want to build a bigger project, than there must be a way to realize that, without diving into the details of how build tools work so you can tweak here and there.
I now realize that opensource is free (which is great), but not easy. Those who claim that their software is much better, easier or whatever is mostly nonsense. Opensource free development tools are a pain in the *** to make good use of it.
Features that don't work well, or you need some tweaking should be released for experienced users, hackers or whatever. For beginners or coders who don't want all that advanced features need a basic release. This prevents from making less experienced programmers demolish their parents house or go to Dr. Phill because of problems in their marriage.
They might just practical developers who don't understand the concept behind software engineering.
Originally Posted by Andaluz