Custom Search

Saturday, February 28, 2009

How to Print Shared Library Dependencies

ldd prints the shared libraries required by each program or shared library specified on the command line.

To see all modules dependencies use the command ldd [options] filename

Linux Command Line to format c source file

In Linux system you can use this command line to format your c source file :

> indent -i4 -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -l90 foo.c

You may want to put these settings in your ~/.indent.pro to automatically invoke this configuration next time.

In verbose, the above means:

* -i4: indent level 4
* -ts4: tab size 4
* -br: braces on if line
* -brs: braces on struct decl line
* -cdw: cuddle do while
* -lp: line up continuation below parenthesis
* -ce: cuddle else
* -nbfda: dont break function decl args
* -npcs: no space after function call names
* -nprs: no space after parentheses
* -npsl: dont break procedure type
* -saf: space after for
* -sai: space after if
* -saw: space after while
* -cs: space after cast
* -ln90: line length 90 columns