Archive for October, 2010

h1

Fixing OpenCV and Dev-C++ linking problems

October 15, 2010

I’m trying these days OpenCV libraries and I got some annoying errors when I tried to compile. The debug window shows something like this:

g++.exe -c main.cpp -o main.o -I”lib/gcc/mingw32/3.4.2/include”  -I”include/c++/3.4.2/backward”  -I”include/c++/3.4.2/mingw32″  -I”include/c++/3.4.2″  -I”include”  -I”C:/OpenCV/include/opencv”

In file included from C:/OpenCV/include/opencv/cxcore.hpp:2243,
from C:/OpenCV/include/opencv/cxcore.h:2123,

from C:/OpenCV/include/opencv/cv.h:58,
from main.cpp:3:
C:/OpenCV/include/opencv/cxoperations.hpp: In member function `void cv::Ptr<_Tp>::addref()’:

After searching about on the internet I’ve found the solution. Just open the file C:\OpenCV2.0\include\opencv\cxoperations.cpp and change the line 68 with this:

#if __GNUC__ >= 4 || __MINGW32__
Now it worked for me and I can compile .cpp files with OpenCV functions.

 

Advertisements
h1

Changing screen resolution on VirtualBox (Linux Debian)

October 13, 2010

Hi after … more than a year!!!

These are the necessary steps that you’ve to follow if you want to change your screen’s resolution using VirtualBox (By the way, this app rocks!) on a Debian virtual machine (Also is applicable to the most of the Linux distros):

  1. Install “build-essential” package. In debian is enough typing apt-get install build-essential
  2. On the VirtualBox menu while the VM is running, press Devices and “Install Guest Additions”. This will mount a cd drive on the system
  3. cd /media/cdrom and sh autorun.sh
  4. Log as root and edit the next file: /etc/X11/xorg.conf
  5. At the end of the file there’s a section called “Screen”. Probably you’ll see “Dept 24”. Open a new line and write the next “Modes “1366×768″ …” And the custom resolution that you need to your machine
  6. Reboot the VM with a shutdown -r now

That’s all, now you’re ready to work with the desired resolution

Cheers