www.digitalmars.com         C & C++   DMDScript  

c++.wxwindows - UNICODE and SQL

reply Borja Torres <Borja_member pathlink.com> writes:
When I compile wxWidgets 2.6.3 with ODBC and UNICODE, I get errors like this:

D:\DATOS\Borja\wxWidgets263\wxMSW\build\msw>smake -f makefile.dms USE_ODBC=1
UNICODE=1

SMAKE  Program Maintenance Utility (Console) Version 7.50
Copyright (c) 1994-1995 Innovative Data Concepts Incorporated
Copyright (c) 1994-2001 Digital Mars
All Rights Reserved

if not exist ..\..\lib\dmc_lib\mswu mkdir ..\..\lib\dmc_lib\mswu
if not exist ..\..\lib\dmc_lib\mswu\wx mkdir ..\..\lib\dmc_lib\mswu\wx
dmc -mn -c -cpp -odmc_mswu\odbclib_db.obj  -o     -D_WIN32_WINNT=0x0400
-D__WXMSW__      -D_UNICODE  -I..\..\lib\dmc_lib\mswu -I..\..\include -w- -I..\.
\src\tiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib  -I..\..\src\regex
-I..\..\src\expat\lib -DwxUSE_GUI=0  -Ar -Ae -H -HP99 -HO- -HHdmc_mswu\pch_wxpre
c_odbclib.sym   ..\..\src\common\db.cpp
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIV
ER_COMPLETE );

^
.\..\src\common\db.cpp(841) : Error: need explicit cast for function parameter
3 to get
from: wchar_t *
to  : unsigned char *
(SQLTCHAR FAR *) authStr.c_str(), SQL_NTS);
^
.\..\src\common\db.cpp(886) : Error: need explicit cast for function parameter
2 to get
from: wchar_t *
to  : unsigned char *
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_
DRIVER_COMPLETE);

^
.\..\src\common\db.cpp(946) : Error: need explicit cast for function parameter
3 to get
from: wchar_t *
to  : unsigned char *
(SQLTCHAR FAR *) authStr.c_str(), SQL_NTS);
^
.\..\src\common\db.cpp(961) : Error: need explicit cast for function parameter
2 to get
from: wchar_t *
to  : unsigned char *
if (SQLGetData(hstmt, 1, SQL_C_WXCHAR, typeName, sizeof(typeName), &cbRet) !
= SQL_SUCCESS)
^
.\..\src\common\db.cpp(1636) : Error: undefined identifier 'SQL_C_WCHAR'
Fatal error: too many errors
--- errorlevel 1
SMAKE fatal error: command "dmc" returned with error code 1
Stopping.

Where is the error?
SQL_C_WCHAR is not difened in DMC, why?

Thanks
Apr 07 2006
parent Borja Torres <Borja_member pathlink.com> writes:
Digital Mars C++ used v8.48 (beta). Thanks

In article <e15q32$1f4r$1 digitaldaemon.com>, Borja Torres says...
When I compile wxWidgets 2.6.3 with ODBC and UNICODE, I get errors like this:

D:\DATOS\Borja\wxWidgets263\wxMSW\build\msw>smake -f makefile.dms USE_ODBC=1
UNICODE=1

SMAKE  Program Maintenance Utility (Console) Version 7.50
Copyright (c) 1994-1995 Innovative Data Concepts Incorporated
Copyright (c) 1994-2001 Digital Mars
All Rights Reserved

if not exist ..\..\lib\dmc_lib\mswu mkdir ..\..\lib\dmc_lib\mswu
if not exist ..\..\lib\dmc_lib\mswu\wx mkdir ..\..\lib\dmc_lib\mswu\wx
dmc -mn -c -cpp -odmc_mswu\odbclib_db.obj  -o     -D_WIN32_WINNT=0x0400
-D__WXMSW__      -D_UNICODE  -I..\..\lib\dmc_lib\mswu -I..\..\include -w- -I..\.
\src\tiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib  -I..\..\src\regex
-I..\..\src\expat\lib -DwxUSE_GUI=0  -Ar -Ae -H -HP99 -HO- -HHdmc_mswu\pch_wxpre
c_odbclib.sym   ..\..\src\common\db.cpp
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_DRIV
ER_COMPLETE );

^
.\..\src\common\db.cpp(841) : Error: need explicit cast for function parameter
3 to get
from: wchar_t *
to  : unsigned char *
(SQLTCHAR FAR *) authStr.c_str(), SQL_NTS);
^
.\..\src\common\db.cpp(886) : Error: need explicit cast for function parameter
2 to get
from: wchar_t *
to  : unsigned char *
sizeof(outConnectBuffer), &outConnectBufferLen, SQL_
DRIVER_COMPLETE);

^
.\..\src\common\db.cpp(946) : Error: need explicit cast for function parameter
3 to get
from: wchar_t *
to  : unsigned char *
(SQLTCHAR FAR *) authStr.c_str(), SQL_NTS);
^
.\..\src\common\db.cpp(961) : Error: need explicit cast for function parameter
2 to get
from: wchar_t *
to  : unsigned char *
if (SQLGetData(hstmt, 1, SQL_C_WXCHAR, typeName, sizeof(typeName), &cbRet) !
= SQL_SUCCESS)
^
.\..\src\common\db.cpp(1636) : Error: undefined identifier 'SQL_C_WCHAR'
Fatal error: too many errors
--- errorlevel 1
SMAKE fatal error: command "dmc" returned with error code 1
Stopping.

Where is the error?
SQL_C_WCHAR is not difened in DMC, why?

Thanks
Apr 07 2006