Sidetracked

I just couldn’t leave well enough alone. I was barely through the process of converting my Imaging code to use the ColorFormat and ComponentPtr classes, when I decide to start porting my Tools library over to Win32 using Microsoft’s Visual C++ Express Edition. The reason for doing this, besides being insane, was that I was developing my code on my Linux-based web server. Eventually, I’m going to write Ruby->C++ interfaces so that I can call my code from Ruby scripts. They will be accessible to my Ruby on Rails sites. However, having to login to the web server to do develepment was becoming a pain, particularly since my ‘net connection at work blocks telnet accesses. To bypass all of this, I decided to try to use a local development environment and get my code working on Win32.

I currently have three libraries with a fourth in the works: Tools, Compression and Imaging, with Cryptography slated for future development.

So far, I’ve been able to get the Tools code to compile, but I’m getting linker errors, probably due to the lack of __dllspec() keywords in the class definitions. Linux development doesn’t require such code overhead, however I’ve done Win32 coding before so I already knew what to expect. I’ve defined LibExport and LibImport macros that are defined according to the OS that I’m developing for. For Win32, they map to the appropriate __dllspec() keywords and nothing for the others. No harm, no foul.

Once I get the Tools.dll library built, I’m going to write a Ruby interface DLL, named ToolsRIF.dll, that will be used by Ruby scripts to get/create class objects defined in the Tools.dll library. Once the concept is proven, I can do the same for Compression and Imaging.

Comments are closed.