Monday, December 31, 2007

graphics under qt4 on windows

Tried one of the 2d open gl graphics examples on windows and it seems to work fine. On to linux next.

qt4 on windows.

It turns out that Paul Thomas at has posted a very clear and complete how to that tells how to get qt4 working under visual studio. Here is the link:

open gl on windows

I have been wanting to do a couple of little graphics projects and so I thought I would put together a graphics programming environment to work in. I want it to be:

portable ( windows /linux )
open source

With this in mind, I am leaning towards opengl.

First I tried glfw. This worked ok but did not seem to have any convenient way to tack on a user interface.

Now I'm trying qt which ( I believe ) comes with an opengl widget.

The next few posts will tell about my qt experience.

Monday, November 12, 2007

opensolaris on hold

Well, I've tried twice to install opensolaris on my vmware machine and both times it froze the machine. The second time it was 40% through. The first time I could not tell. I suspect I need more memory ( I have 1G and opensolaris demands 3/4G to proceed with the install). In any case, it's more trouble than it is worth so I'm giving up for now.

Sunday, November 11, 2007

used to create virtual machine

Created virutal machine using web based utility:

specified :
768mb memory
10gb harddrive
opensolaris.iso for second cd drive.

downloaded x86 stable snapshot from sun

I'm downloading the stable "Solaris Express Developer Edition" from sun. This appears to be the most stable choice. It comes in three parts which need to be combined to make an dvd iso.


I'm going to try to get gcc running on opensolaris running under vmware. The next few posts will document the process.

Sunday, August 5, 2007

using wget to get stuff from siteflip

wget -r ftp://(name):(passwword)

creating a cvs module

export CVSROOT=:pserver:localhost:/garland
cvs login
mkdir beamtruss

cd beamtruss
cvs import -m "creating beamtruss module" beamtruss vtag rtag

starting a new cvs repository

here is what I had to do to start a new cvs repository:

cvs -d /var/lib/cvsd/garland init

add line: ' Repos /garland' to /etc/cvsd/cvsd.conf

create: /var/lib/cvsd/garland/CVSROOT/passwd with appropriate entries.

change ownership: chown -R cvsd /var/lib/cvsd/garland

Tuesday, June 12, 2007

more haru (font_demo)

Downloaded font_demo.c from haru web site. Created new project : font_demo under haru solution. Did standard dependencies and include directories.

more haru

Specified haru include directory as needed.


Created haru solution / libhpdf project from within msvc. Name "libhpdf" chosen to match name in .def file provided in haru download.

more pngtest

Was getting zlib library not found. Worked around by modifying cygwin bash startup script to set DLL_PATH to contain location of zlib library and then modifying bat file that starts msvc append DLL_PATH to Path.

At this point pngtest compiles and runs and passes test ( after changing working directory to that of pngtest.png)

more pngtest

Removed explicit png/zlib library dependencies from pngtest.


Had to adjust include path for pngtest for zlib as done for png library.

more png

As written, the png project file had an explicit reference to the zlib library. I removed this and made the png library dependent on zlib. This seems cleaner.

cygwin environment

I wanted to be able to impose my cygwin environment vars inside of msvc so I copied and modifed cygwin.bat as follows:

@echo off

chdir C:\cygwin\bin

bash --login -i -c 'C:/WINDOWS/system32/cmd.exe /K "c:\cygwin_home\dave\workarea\env\startvc.bat"'
I also created a new desktop shortcut to call this .bat file

more png

Got some undeclared identifiers:

c:\cygwin_home\dave\workarea\png\libpng-1.2.18\pngvcrd.c(315) : error C2065: 'PNG_ASM_FLAG_MMX_READ_COMBINE_ROW' : undeclared identifier
c:\cygwin_home\dave\workarea\png\libpng-1.2.18\pngvcrd.c(1219) : error C2065: 'PNG_ASM_FLAG_MMX_READ_INTERLACE' : undeclared identifier
c:\cygwin_home\dave\workarea\png\libpng-1.2.18\pngvcrd.c(3700) : error C2065: 'PNG_ASM_FLAG_MMX_READ_FILTER_SUB' : undeclared identifier
c:\cygwin_home\dave\workarea\png\libpng-1.2.18\pngvcrd.c(3703) : error C2065: 'PNG_ASM_FLAG_MMX_READ_FILTER_UP' : undeclared identifier
c:\cygwin_home\dave\workarea\png\libpng-1.2.18\pngvcrd.c(3706) : error C2065: 'PNG_ASM_FLAG_MMX_READ_FILTER_AVG' : undeclared identifier
c:\cygwin_home\dave\workarea\png\libpng-1.2.18\pngvcrd.c(3709) : error C2065: 'PNG_ASM_FLAG_MMX_READ_FILTER_PAETH' : undeclared identifier

These are resolved by defining PNG_MMX_CODE_SUPPORTED. I don't know if this is the best way (or even a good way) to fix this.

just noticed zlib v8

Just noticed that the zlib directory contains


which appears to have vc 8.0 sln/vcproj files

Probably this would have worked as well as converting the v6 projects but I'm not going to go back now - maybe some other time

more png

Changing the zlib project under png required that I also change the include path for png to get zlib.h . To make this a little less path dependent, I scripted the msvc startup to include a WORKAREA variable:

set WORKAREA=c:\cygwin_home\dave\workarea
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\VCExpress.exe"

Additional include directories for libpng are modified to include : "$(WORKAREA)\zlib\zlib-1.2.3"

compiling png

the png solution references a zlib project that does not exist. I deleted that reference and replaced it with the zlib project that I created when compiling zlib stand alone.

msvc project conversions

I'm using the free msvc express compiler (aka msvc 8.0). The zlib and png downloads provided v6 projects. I converted the v6 projects for use in msvc express. A v7.1 project also came with png but I stuck with v6 for (what seemed like) consistency.

compling zlib

had to download masm from microsoft to compile zlib. It turns out that zlib assembly has 4 compile errors that have to be fixed by hand:

inffas32.asm(647) : error A2070: invalid instruction operands
inffas32.asm(649) : error A2070: invalid instruction operands
inffas32.asm(663) : error A2070: invalid instruction operands
inffas32.asm(720) : error A2070: invalid instruction operands

All these are due to the same problem. Found the following fix online:

- movd mm7,[esi]
+ movd mm7,dword ptr[esi]

haru dependencies

haru depends on zlib and png. I downloaded all 3 of these and unpacked them into a directory called workarea.

haru itself has a windows specific download - use that one. I don't know if the source code is different but the one thing that this has that the generic does not is a def file that is needed to generate a .lib file.

Got the whole thing started under bzr with :

bzr init
bzr add
bzr commit -m "initializing"

I'm just trying out bazaar (bzr). Not sure yet how much I like it.

experimenting with pdf related code.

I spent a day or so playing with libhpdf (haru) which is a c library for pdf code generation. I eventually got it to build under msvc 8.0 . The next few posts will describe some of the things that I did to get it working.