Wednesday, April 25, 2007

stuff n nonsense

broke my wxWidgets install yesterday when i reconfigured the build. it seems wxWidgets becomes a radically different and undocumented animal when you build it with some settings (such as STL and using std::string) turned on. anyhow, i tried rebuilding it to no avail - it was still broke. so right now i'm uncompressing the wxWidgets 2.8 distribution to rebuild it. kinda sucky, isn't it?

in other news, i found i am unable to build Boost from source with Visualc C++ 2005 Express. the build script (build.bat) is not designed to work with any toolset other than VC++ 7, and it's really annoying that i have to go online and download a prebuilt Jam binary. of course, code that depends on Boost and its build process (like the ASL) also doesn't build. sheesh!

finally, to use IBPP under both ANSI/Unicode in Windows, you're going to have to patch the file _ibpp.cpp. i tried a number of hacks that failed, but i finally got someting working, so here it is for version 2.5:

  • Line 111: change char fbdll[MAX_PATH]; to TCHAR fbdll[MAX_PATH];
  • Line 142: change mHandle = LoadLibrary(path.c_str()); to mHandle = LoadLibrary((const TCHAR *) path.c_str());.
    Note: There has got to be a cleaner way of doing this than just casting. Check MSDN or the Platform SDK for documentation on MultiByteToWideChar() under User Interface, International Text Display, Unicode and Character Sets.
  • Line 167: change char* p = fbdll + len; to TCHAR* p = fbdll + len;
  • Line 170: change lstrcat(fbdll, "\\fbembed.dll"); to lstrcat(fbdll, TEXT("\\fbembed.dll"));
  • Line 175: change lstrcat(fbdll, "\\fbembed.dll"); to lstrcat(fbdll, TEXT("\\fbembed.dll"));
  • Line 194: change lstrcat(fbdll, "bin\\fbembed.dll"); to lstrcat(fbdll, TEXT("bin\\fbembed.dll"));
  • Line 204: change mHandle = LoadLibrary("fbclient.dll"); to mHandle = LoadLibrary(TEXT("fbclient.dll"));
  • Line 209: change mHandle = LoadLibrary("gds32.dll"); to mHandle = LoadLibrary(TEXT("gds32.dll"));
i guess that pretty much covers it. you should go from 12 errors to 0 compiling _ibpp.cpp in Unicode mode with this in Windows. personally, though i don't think this is how the Flamerobin team built the Unicode Windows binary, but i - lacking patience at the time to wade through the code for the Unicode version - just decided to fix my problems myself.

i was finally able to make some headway with learning how to use Crypto++. i'm just a simple guy who wants to hash a password, and i don't want to learn all about cryptography to do that! many thanks to the developers of Hashish for their source code, and to Denis Bider for his Crypto++ User's Guide.

besides my problems with trying to program (and ultimately succeeding), i've been delving into music a bit (at least i know what a chord is now, and can try to play scales other than C major). maybe i'll actually get into digital music someday. oh, yeah, i've also been trying to study so i can be ready for exams when school opens (only God knows when). later!

1 comment:

Unknown said...

Blast from the past :)

USES_CONVERSION;
mHandle = LoadLibrary(A2W(path.c_str()));