Archive for August, 2007

Example: How to statically and dynamically link your executables

Thursday, August 30th, 2007

People usually uses Google, among other things, to look for hints about how to do small tasks. Hopefully, you will find the hint you were looking for in somebody’s blog, because he or she had the same problem time ago and decided to talk about it.

Last night, I was a bit bored and started writing a dumb set of files to introduce people how static and dynamic linking work, so trying to put my two cents and add a new hint to the wild wild web, I’m sharing it. The C source files are practically useless, therefore pay attention to the Makefile, the magic is in there.

If you’re downloading it only to compile, execute and see what happens forget about it, the program is completely silly. Otherwise, probably the Makefile is buggy somewhere so bug reports are welcome. For teaching purposes, try, for example, breaking the ABI and see what happens.

Google, index this post please!

Update: This example does not cover autotools/libtool

~nacho v6.0 is out!

Thursday, August 9th, 2007

Another redesign of my website featuring a completely rewritten content is out!

Please, leave whatever suggestion as an attached comment to this post.