Saturday, April 28, 2007

IBPP...again!

i found that i didn't list all the changes i made to the IBPP source file _ibpp.cpp in my last post. plus, i'd only been using it for release build of my projects in Visual C++ 2005 Express edition - until today when i started a project in debug mode - and found i got some compile errors. so, here's the comprehensive list of changes i made to the original source file to compile with a Unicode character set, without further ado. i really should upload the file, but since i have no place to put it...

  • Line 44: from #define REG_KEY_ROOT_INSTANCES "SOFTWARE\\Firebird Project\\Firebird Server\\Instances" to #define REG_KEY_ROOT_INSTANCES TEXT("SOFTWARE\\Firebird Project\\Firebird Server\\Instances")
  • Line 45: from #define FB_DEFAULT_INSTANCE "DefaultInstance" to #define FB_DEFAULT_INSTANCE TEXT("DefaultInstance")
  • Line 87: from ::OutputDebugString(("IBPP: " + p->str() + "\n").c_str()); to ::OutputDebugString((const TCHAR *) ("IBPP: " + p->str() + "\n").c_str());
all other changes remain the same as in my previous post - did you really think i'd want to duplicate effort? Note: as in my previous post, you may want to use a safer way of getting things done than a cast on line 87.

a word of note here: i finally looked through the sources for Flamerobin 0.7.6 sources and there were no changes to the IBPP source. i have no idea how they managed to get it to build under Windows/Unicode. i haven't tried building it myself, nor am i likely to (according to Larry Wall, the creator of Perl, programmers are inordinately lazy. and i intend becoming an excellent programmer).

2 comments:

Dug said...

good good that !
thanks for this modifications, it's ok in my program.
thanks for all.
( i'm french ;) )

rayburgemeestre said...

Nice fixes.

How I get the sourcecode to work in my unicode program however, without modifying the source is as follows.

Simply don't compile the file all_in_one.cpp (or all ibpp/core/*.cpp files individually) with the defines/"preprocessor definitions" _UNICODE and UNICODE enabled.

I didn't look at the Flamerobin source, but my guess is that they do the same.