SOCI doesn't compile when using the UNICODE
flag on Windows
#1111
Labels
OS/Windows
Issues reported or related to Windows
UNICODE
flag on Windows
#1111
When defining the
UNICODE
preprocessor flag when compiling on Windows, SOCI fails to compile. The reason being that this flag causes functions calls to the Windows API that don't explicitly use theA
(Ansi) orW
(wide-string, aka: "unicode") flavor to switch to the latter and SOCI seems to expect to use the former.I guess the easiest fix would be to simply be explicit about using the
A
variants of functions such asLoadLibrary
(LoadLibraryA
).However, this wouldn't account for everything as e.g. ODBC seems to also take this setting into account causing it to use
SQLWCHAR
instead ofSQLCHAR
which then causes further compile errors.Maybe explicitly un-defining
UNICODE
in the affected source files might be enough to revert back to normal behavior?Another option would be to make
SOCI
itself adapt this "unicode"-weirdness (on Windows) and switch to wide-charracter representations. However, I think this is probably the least desirable way forward 👀The text was updated successfully, but these errors were encountered: