Computer Scientist

Tuesday, 30 November 2010

Application of Double pointer in C

1. 作为参数, 用于函数改写指针参数。




2. 用来组建多维数组。
      具体参见: http://landerchan.blogspot.com/2008/11/dynamically-allocating-multidimensional.html

Tuesday, 23 November 2010

Linkage error for Linux package installation

Troubleshooting:cannot open shared object file: No such file or directory

From MythTV

Jump to: navigation, search
This advice applies to those people running an SVN version of myth, not the tarball or packaged versions.
If you see this:
/usr/local/bin/mythbackend: error while loading shared libraries:
libmyth-0.20.so.0.20.0: cannot open shared object file: No such file or directory
after updating myth, then you probably need to do the following:
sudo locate -u
locate libmyth-0.20.so.0.20.0
That will return something like
/home/mythtv/compile/svn/mythtv/libs/libmyth/libmyth-0.20.so.0.20.0
/usr/local/lib/libmyth-0.20.so.0.20.0
The first one (for me) was the path to the folder I compiled MythTV in. The 2nd line is the installed location of libmyth. I need to add the folder its in (in this case /usr/local/lib/). You need to append that to the end of /etc/ld.so.conf. For me, I would now execute as root
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig
If that doesn't work try make distclean, then configure, then make and make install.
If that all fails, try a fresh checkout of the svn repository, after deleting or moving your current checkout:
svn co http://svn.mythtv.org/svn/trunk/mythtv
svn co http://svn.mythtv.org/svn/trunk/mythplugins
svn co http://svn.mythtv.org/svn/trunk/myththemes
Then go through the usual build process (configure && make && make install).

Reference: http://www.mythtv.org/wiki/Troubleshooting:cannot_open_shared_object_file:_No_such_file_or_directory

The meaning of printf(_("Some Strings"))

This is related international programming and GNU i18n. _() can be identified as the Macro of gettext() function. More details can be found here:
http://en.wikipedia.org/wiki/GNU_gettext

Monday, 8 November 2010

Install wireshark on Fedora 11

1, yum install wireshark. this is quite straight forward.

2, yum install wireshark-gnome. This this necessary!!!


As for the installation on MAC OS X, this is still on working or I would rather give up. I don't want to make my MAC bulky.