[Klug-general] Saturday 25th July 10am to 2pm

Mike Evans mike at tandem.f9.co.uk
Fri Jul 17 10:14:17 UTC 2009


> 
> it seemed to take a lot of searching to discover i could pass CFLAGS on
> the commandline to ./configure to disable optimization and enable a
> greater level of debugging information, ( i was expecting to
> --enable-debug or have a debug target for make or something ) but in GDB
> when stepping through the lib i have to type list to see the code - it
> no longer prints the line#+codesegment as i step.
> 

Like I said: I'm very much at the entry level stage on this.  I've a 
past of writing loads of C and managing a department responsible for C 
development.  However that was a too long ago to be relevant to today's 
tools.

What I have found it an excellent online presentation, that and a couple 
of other sites taught me what I now know.  Much of what I would present 
would come from this - but it is 162 slides long and goes into great 
depth so I'd be extracting a minimum for a basic talk.  All the info you 
would need on passing parameters - or setting them up in configuration 
is in there I think.

   http://www.lrde.epita.fr/~adl/dl/autotools.pdf

I've been using eclipse in conjunction with the tools and debugging has 
worked pretty-much seamlessly.  It just changes all the compile options 
and recompiles when you say you want to debug.  I did find this comment 
online:

 
http://www.linuxquestions.org/questions/programming-9/unable-to-step-through-function-in-shared-object-library-using-gdb-174768/



> 
> are you making use of the generated config.h ? i'm a little confused as
> to how i should deal with it 

My understanding of config.h is that you just include it in all your C 
files and configure will generate it to have 'all the standard stuff' 
I'm sure there is a definition of what 'all the standard stuff' is - but 
I guess my Fedora has it all anyway as my resulting config.h is tiny. 
Turns out I only needed a few standard library functions for my little 
project so far.

> 
> i wanted to disable a dependancy so as to not insist on people installing
> a lib and then not compile the code that depended on it, but, wanted to
> use pkg-config, but, .... very confusing.
> 

pkg-config should allow you to do that (assuming you mean the --exists 
flag) and config defines a variable to get you to the program on 
whatever system you end up compiling on.  There is nothing stopping you 
defining new rules in Makefile.in to use it how you want - including 
creating your own 'myconfig.h'.  You could then just use the result to 
remove the bits of your code that would fail to compile without whatever 
it is you don't have using #ifdef.  Alternatively link with your own 
version of the library which just contains null functions.  All theory 
on my part as I've never tried it.

Oh and let me say I agree with you on CSS hacks - for any platform.  In 
fact I think CSS is the biggest dogs dinner. I take great delight in 
pointing people who thing that modern computing is 'so much better' at 
CSS.  I'm starting to see the value of what yahoo have done with their 
YUI, particularly reset and grids.

Mike



More information about the Kent mailing list