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 reply "Włodzimierz Skiba" <abx abx.art.pl> writes:
Borja Torres <Borja_member pathlink.com> wrote in
news:e15q0u$1f23$1 digitaldaemon.com: 
 When I compile wxWidgets 2.6.3 with ODBC and UNICODE, I get errors
 like this: 
Most probably because of older sql headers included with DMC. Have you tested it with newer psdk from microsoft? ABX
Apr 07 2006
parent reply Borja Torres <Borja_member pathlink.com> writes:
In article <e16eig$2fo6$1 digitaldaemon.com>, Włodzimierz Skiba says...
Borja Torres <Borja_member pathlink.com> wrote in
news:e15q0u$1f23$1 digitaldaemon.com: 
 When I compile wxWidgets 2.6.3 with ODBC and UNICODE, I get errors
 like this: 
Most probably because of older sql headers included with DMC. Have you tested it with newer psdk from microsoft? ABX
No, I don't tested it with newer psdk. How do I use Sdk with DMC?
Apr 07 2006
parent Borja Torres <Borja_member pathlink.com> writes:
I install Digital Mars's CD with v 8.47 update.
The library Winspool.lib from version 8.47 is wrong. I copy winspool.lib from
version 8.45 to the 8.47.
I install the MS platform sdk 2003 with this help:
http://cmeerw.org/prog/dm/ms_sdk.html

Then, I copy the next files from original include and lib directories:

\dm\lib\uuid.lib (DMC v8.47)
\dm\lib\winspool.lib (DMC v8.45)

\dm\include\ver.h (DMC v8.47)
\dm\include\Win32\ver.h (DMC v8.47)
\dm\include\scdefs.h (DMC v8.47)
\dm\include\Win32\scdefs.h (DMC v8.47)

These are for MFC 4.2 and wxWidgets 2.6.3 for ANSI and UNICODE.

That are all.

Thanks.

In article <e16oal$1hm$1 digitaldaemon.com>, Borja Torres says...
In article <e16eig$2fo6$1 digitaldaemon.com>, Włodzimierz Skiba says...
Borja Torres <Borja_member pathlink.com> wrote in
news:e15q0u$1f23$1 digitaldaemon.com: 
 When I compile wxWidgets 2.6.3 with ODBC and UNICODE, I get errors
 like this: 
Most probably because of older sql headers included with DMC. Have you tested it with newer psdk from microsoft? ABX
No, I don't tested it with newer psdk. How do I use Sdk with DMC?
Apr 08 2006