Sunday, August 23, 2009

deprecated conversion warning for char* in GCC

g++-4.x gives following warning whenever a string with in double quotes is assigned to a char * :

warning: deprecated conversion from string constant to ‘char*’

Though there is no fix available as far as I know except for following two solutions:
1. convert 'char *' to 'const char*' whenever a string is to be assigned.
2. use a type cast to convert a string to a char*.

For example:

const char *name = "Adam Smith"
char *name = (char*) "Adam Smith"


To get rid of deprecated conversion warning, pass -Wno-write-strings option to g++

opencv on Ubuntu Jaunty

Opencv does not handle videos properly on Ubuntu Jaunty. In order to fix this, please follow the instructions given at this link:

http://gijs.pythonic.nl/blog/2009/may/3/getting-video-io-working-opencv-and-ubuntu-jaunty-/

Monday, August 10, 2009

Vim-latex suite on Ubuntu Jaunty

First install vim-latex package using synaptic packet manager. Then run following command on a terminal :

$ sudo vim-addons -w install latex-suite

Now opening a tex document with gvim should show tex related menus on the menu bar.

If this does not help, then refer to ubuntu forums for solution. For instance check this link.