Thread overview | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
April 01, 2006 BC++ accepts BUT DM C++ compiler reports as errors | ||||
---|---|---|---|---|
| ||||
I am new to dm c++ compiler.(purchased CD 15 days back ) Till now I have used Borland C++ and borland c++builderX compiler. Now planning to switchover to DM C++ But I get following errors. I am compiling for WIN32 (no ODBC/no MFC ) Can some one help me ? #include <sqltypes.h> #include <sql.h> #include <sqlext.h> extern SQLHANDLE EnvHandle; extern SQLHANDLE ConHandle; extern SQLHANDLE StmtHandle; ------------- compiler messages as follows. sc BROWMEM.CPP -cpp -Jm -Aa -mn -C -o+time -WA -S -3 -a8 -c -l -gf -DBTI_WIN_32 -DNOMACHINES -DxWIN32 -od:\talam5\BROWMEM.obj Error: D:\talam\BTRIEVE.H(5): missing ',' between declaration of 'SQLHANDLE' and 'EnvHandle' Error: D:\talam\BTRIEVE.H(6): missing ',' between declaration of 'SQLHANDLE' and 'ConHandle' Error: D:\talam\BTRIEVE.H(7): missing ',' between declaration of 'SQLHANDLE' and 'StmtHandle' Error: D:\talam\BROWMEM.CPP(26): size of text_info is not known Fatal Error: D:\talam\BROWMEM.CPP(27): too many errors Lines Processed: 205425 Errors: 5 Warnings: 0 Build failed |
April 01, 2006 Re: BC++ accepts BUT DM C++ compiler reports as errors | ||||
---|---|---|---|---|
| ||||
Posted in reply to cdt | cdt@rediffmail.com wrote:
> #include <sqltypes.h>
> #include <sql.h>
> #include <sqlext.h>
>
> extern SQLHANDLE EnvHandle;
> extern SQLHANDLE ConHandle;
> extern SQLHANDLE StmtHandle;
>
> ------------- compiler messages as follows.
>
> sc BROWMEM.CPP -cpp -Jm -Aa -mn -C -o+time -WA -S -3 -a8 -c -l -gf -DBTI_WIN_32
> -DNOMACHINES -DxWIN32 -od:\talam5\BROWMEM.obj Error: D:\talam\BTRIEVE.H(5): missing ',' between declaration of 'SQLHANDLE' and
> 'EnvHandle'
Try turning on the macro preprocessor output with -e -l and look at the resulting .lst file.
|
April 01, 2006 Re: BC++ accepts BUT DM C++ compiler reports as errors - a.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright Attachments: | In article <e0mle7$j66$1@digitaldaemon.com>, Walter Bright says... >Try turning on the macro preprocessor output with -e -l and look at the resulting .lst file. Thank you for prompt reply... For pinpointing I created another source file with just 5 lines of a.cpp source code file and compiled. #include <sql.h> #include <sqlext.h> extern SQLHANDLE EnvHandle; extern SQLHANDLE ConHandle; extern SQLHANDLE StmtHandle; sc a.cpp -cpp -Jm -Aa -mn -C -o+time -D_WINDOWS -S -3 -a8 -c -e -l -gf -DBTI_WIN_32 -DNOMACHINES -DxWIN32 -od:\talam5\a.obj Error: C:\DM\BIN\..\include\win32\SQLTYPES.H(98): missing ',' between declaration of 'HWND' and 'SQLHWND' Error: C:\DM\BIN\..\include\win32\SQLEXT.H(72): ')' expected Error: D:\TALAM\a.cpp(3): missing ',' between declaration of 'SQLHANDLE' and 'EnvHandle' Error: D:\TALAM\a.cpp(4): missing ',' between declaration of 'SQLHANDLE' and 'ConHandle' Fatal Error: D:\TALAM\a.cpp(5): too many errors Lines Processed: 322 Errors: 5 Warnings: 0 Build failed |
April 02, 2006 Re: BC++ accepts BUT DM C++ compiler reports as errors - a.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to cdt | cdt@rediffmail.com wrote: > In article <e0mle7$j66$1@digitaldaemon.com>, Walter Bright says... >> Try turning on the macro preprocessor output with -e -l and look at the resulting .lst file. > > Thank you for prompt reply... For pinpointing I created another source file with just 5 lines of a.cpp source > code file and compiled. > > > #include <sql.h> > #include <sqlext.h> > extern SQLHANDLE EnvHandle; > extern SQLHANDLE ConHandle; > extern SQLHANDLE StmtHandle; > > sc a.cpp -cpp -Jm -Aa -mn -C -o+time -D_WINDOWS -S -3 -a8 -c -e -l -gf > -DBTI_WIN_32 -DNOMACHINES -DxWIN32 -od:\talam5\a.obj Error: C:\DM\BIN\..\include\win32\SQLTYPES.H(98): missing ',' between > declaration of 'HWND' and 'SQLHWND' > Error: C:\DM\BIN\..\include\win32\SQLEXT.H(72): ')' expected > Error: D:\TALAM\a.cpp(3): missing ',' between declaration of 'SQLHANDLE' and > 'EnvHandle' > Error: D:\TALAM\a.cpp(4): missing ',' between declaration of 'SQLHANDLE' and > 'ConHandle' > Fatal Error: D:\TALAM\a.cpp(5): too many errors > Lines Processed: 322 Errors: 5 Warnings: 0 > Build failed > > it seems like sqlext.h expects windows.h to be included BEFORE it at least it uses HWND as if it was defined, but sqltypes.h doesn't include windows.h itself for this purpose just adding #include <windows.h> before #include <sql.h> solved your problem (for me) but I use Win32 Platform SDK 2000(?) year instead of DMC's headers (which are a little old being of 96 year) Nic Tiger |
April 02, 2006 Re: BC++ accepts BUT DM C++ compiler reports as errors - a.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nic Tiger | In article <e0nqdc$1nff$1@digitaldaemon.com>, Nic Tiger says... >it seems like sqlext.h expects windows.h to be included BEFORE it > #include <windows.h> > #include <sql.h> solved your problem (for me) but I use Win32 Platform SDK 2000(?) year instead of DMC's headers (which are a little old being of 96 year) >Nic Tiger Thanks M Nic. Added windows.h as well as removed extern word from one statement This is cleared by BC5.5 (2000) compiler Drv-C++ I switched over to DM ( 15-20 days back ) to have latest implementations in compiler technology. (also DM's strenth of speed,size). Dev-C++ is toooo slow for my complex / huge packages. SO sticking to "Win32 Platform SDK 2000" or not using latest DM will be my last alternative. ----------a.cpp-------------- include <windows.h> #include <sql.h> #include <sqlext.h> SQLHANDLE EnvHandle; extern SQLHANDLE ConHandle; extern SQLHANDLE StmtHandle; ------------------------------- sc a.cpp -cpp -Jm -Aa -mn -C -o+time -D_WINDOWS -S -3 -a8 -c -e -l -gf -DBTI_WIN_32 -DNOMACHINES -DxWIN32 -od:\talam5\a.obj Error: D:\TALAM\a.cpp(4): missing decl-specifier-seq for declaration of 'SQLHANDLE' Error: D:\TALAM\a.cpp(5): missing ',' between declaration of 'SQLHANDLE' and 'ConHandle' Error: D:\TALAM\a.cpp(6): missing ',' between declaration of 'SQLHANDLE' and 'StmtHandle' Lines Processed: 125126 Errors: 3 Warnings: 0 Build failed |
April 02, 2006 Re: BC++ accepts BUT DM C++ compiler reports as errors - a.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to cdt | cdt@rediffmail.com wrote:
>
> Thanks M Nic.
>
> Added windows.h as well as removed extern word from one statement
> This is cleared by BC5.5 (2000) compiler Drv-C++
> I switched over to DM ( 15-20 days back ) to have latest implementations in
> compiler technology. (also DM's strenth of speed,size).
> Dev-C++ is toooo slow for my complex / huge packages.
> SO sticking to "Win32 Platform SDK 2000" or not using latest DM will be my last
> alternative.
I meant that I use DMC *with* newer PSDK header/libs
I definitely will not stop using DMC, as it seems best compiler I have ever had (and also it compiles for DOSX which is essential for good real-time apps) :)
Intel Compiler 8.1 is also good, but very slow at the same level of optimizations as DMC/ not to mention it costs $450 :)
|
April 02, 2006 SOS!!!.... DM C++ compiler reports as errors - a.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nic Tiger | In article <e0oq7t$2qjr$1@digitaldaemon.com>, Nic Tiger says... >I definitely will not stop using DMC, as it seems best compiler I have ever had.Intel Compiler 8.1 is also good, but very slow at the same level of optimizations as DMC/ not to mention it costs $450 :) Yes Sir, I 100% agree with you. We are in same boat. Right now I need help for switching over to DM C++; I dont know, where is the problem. If problem is in sql*.h header files then it must have faced by many programmers. So the chances of header file flaw is < 0.0001%. Does DM need additional header files to compile this code clean? ----------a.cpp-------------- include <windows.h> #include <sql.h> #include <sqlext.h> SQLHANDLE EnvHandle; extern SQLHANDLE ConHandle; ------------------------------- |
April 02, 2006 Missing statements in header file. Is it a knows issue? | ||||
---|---|---|---|---|
| ||||
Posted in reply to cdt | UNFORTUNATELY my guess turned out TRUE. Borland compiler header file sqltypes.h contains following lines. Equivalant lines are missing in DM header files. How come no one reported this earlier? or DM uses different reserve words? Header files of next version will have similar lines? /* generic data structures */ #if (ODBCVER >= 0x0300) #if defined(WIN32) typedef void* SQLHANDLE; #else typedef SQLINTEGER SQLHANDLE; #endif /* defined(WIN32) */ typedef SQLHANDLE SQLHENV; typedef SQLHANDLE SQLHDBC; typedef SQLHANDLE SQLHSTMT; typedef SQLHANDLE SQLHDESC; #else #if defined(WIN32) typedef void* SQLHENV; typedef void* SQLHDBC; typedef void* SQLHSTMT; #else typedef SQLINTEGER SQLHENV; typedef SQLINTEGER SQLHDBC; typedef SQLINTEGER SQLHSTMT; #endif /* defined(WIN32) */ #endif /* ODBCVER >= 0x0300 */ |
April 03, 2006 Re: Missing statements in header file. Is it a knows issue? | ||||
---|---|---|---|---|
| ||||
Posted in reply to cdt | cdt@rediffmail.com wrote: > UNFORTUNATELY my guess turned out TRUE. > > Borland compiler header file sqltypes.h contains following lines. > Equivalant lines are missing in DM header files. > > How come no one reported this earlier? or DM uses different reserve words? > > Header files of next version will have similar lines? Yes, I think this is the problem of MS Win32 Platform SDK in DMC (PSDK ~96), in PSDK ~2000 and in PSDK ~2005 (downloaded last year in April) all have sql.h and sqltype.h without #include <windows.h> This may mean that MS technicians are sure that everyone uses stdafx.h with first line "#include <windows.h>" :) So relax, add this include and proceed porting We can't do anything with MicroSoft :) Nic Tiger |
April 03, 2006 Defination of SQLHANDLE is missing from header files ??? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nic Tiger | In article <e0s0th$1n1s$1@digitaldaemon.com>, Nic Tiger says... >This may mean that MS technicians are sure that everyone uses stdafx.h with >first line "#include <windows.h>" :) >So relax, add this include and proceed porting >We can't do anything with MicroSoft :) MS is a problem... BUT ...... Problem is not solved by including windows.h nor by stdafx.h SQLHANDLE error is not solved by these header files. defination of SQLHANDLE is missing from any .h files available with DM folder DM has to act very quickly... its a request from a well-wisher. Evans Data and DevX.com has already published reviews of top 10 IDEs & Compilers. http://nl.internet.com/c.html?rtr=on&s=1,2ca8,1,1ywc,8v9t,kgi0,36tu |
Copyright © 1999-2021 by the D Language Foundation