CMake and C++ “Compile Time” Polymorphism

For a recent project of mine, I wanted to use what some people call “Compile Time Polymorphism” in C++. Here’s how I implemented it. Polymorphism in the context of programming computers usually refers to the ability to tread objects of a different data type through the same interface. In C++, this is often implemented through […]

ImageMagick, libjpeg, etc. on Mac OS X

Here’s how I got ImageMagick with JPEG support to compile and run on Mac OS X 10.6 (Intel). First, I got the ImageMagick Source Code via Subversion, per the instructions from http://www.imagemagick.org/script/subversion.php. Short version: $ svn co https://www.imagemagick.org/subversion/ImageMagick/branches/ImageMagick-6.6.5 ImageMagick-6.6.5 Then, I pulled libjpeg from the Independent JPEG Group. I had to extract the source code […]

Testing with Google’s C++ Test Framework (gtest)

The other day I was playing around with Google’s C++ Testing Framework (a.k.a. gtest). I tried to build the Code with Visual Studio 2008 Express and got some strange linker errors. I was able to solve the errors thanks to this site. In essence, I had to change the “Runtime Library” Setting in the C/C++ […]

Linker Sets

Reminder: When placing something in a dedicated section using __attribute__((section(“foobar”))), the GNU toolchain will automatically add a symbol __start_foobar at the beginning and a symbol __stop_foobar at the end of the section. However, you will need a reference to that symbol in order to prevent the linker from optimizing the symbol away. In other words, […]

Building qfsm on Ubuntu 8.04

I just tried to build qfsm on Ubuntu 8.04. The only dependencies listed by qfsm are CMake and Qt 4.3.x – both of which are available through the Ubuntu packet manager. However, when I followed the instructions provided along with the qfsm source code, I encountered this error message: [ 41%] Building CXX object CMakeFiles/qfsm.dir/src/ExportAHDLDlgImpl.o […]

Follow-Up

A quick follow-up to "Parallels" for Linux. I’ve managed to run the Windows XP Partition on my Laptop inside KVM-88 like this: #!/bin/sh export SDL_VIDEO_X11_DGAMOUSE=0 sudo qemu-system-x86_64 -hda /dev/sda -net nic -net user -m 1024 -cdrom fixntldr.iso -boot d -usb -usbdevice tablet -monitor stdio To send Ctrl+Alt+Del, I needed to enter this at the QEMU […]