File sqlfront.h contains a bug according to Borland c++ 5.0B compiler

File sqlfront.h contains a bug according to Borland c++ 5.0B compiler

Post by Franz J Fortun » Tue, 14 Jan 1997 04:00:00



I have not been able to compile a DOS application that will connect to the
SQL Server 6.5 because I get the following error at compile time of the
module that includes the header file called:

sqlfront.h (\mssql\dblib\include\sqlfront.h)

The Borland c++5.0B compiler reports:

Error:SQLFRONT.H(236,29):Incorrect pragma directive option: -a+

Does anybody know what this is about?

It is a DOS Large Model application. DBMSDOS is defined.

Thank you for your help.

Franz J Fortuny

 
 
 

1. Compiling SQL-Server samples with Borland C++ compiler

Hallo,

I use the Borland C++ 5.0 compiler under Windows NT and I want to
compile the samples for the Microsoft-SQL-Server which were written and
compiled successfully with the Microsoft Visual C++ 4.0 compiler.

Because I don't have the Microsoft Visual C++ 4.0 compiler, I have to do
the settings in the Borland compiler that it behaves 100% compatible
to the Microsoft compiler.

All Headerfiles and Libfiles are registered under OPTIONS/PROJECT ->
DIRECTORIES.
When I try to compile the sample PROCSRV from the Open Data Services
for Microsoft SQL-Server, I get the following error-messages

Error: Unresolved external '_srv_config' referenced from module procsrv.c
Error: Unresolved external '_srv_config_alloc' referenced from module
procsrv.c
Error: Unresolved external '_srv_errhandle' referenced from module
procsrv.c
..

So I had a look at OPTIONS/PROJECT ->COMPILER ->COMPILER OUTPUT
->GENERATE UNDERSCORE
because in the DEF-file in which these functions (_srv_config,
srv_config_alloc, ...) are declared there are no underscore before these
functions

File OPENDS60.DEF
LIBRARY OPENDS60.DLL

EXPORTS



   ...
  ^----- NO UNDRSCORE

In OPTIONS/PROJECT ->COMPILER ->COMPILER OUTPUT ->GENERATE UNDERSCORE I
reset the flag and therefore I don't get the error-messages above but the
following error-messages

Error: Unresolved external 'strnicmp' referened from module procsrv.c
Error: Unresolved external 'sprintf' referenced from module procsrv.c
Error: Unresolved external 'malloc' referenced from module procsrv.c
..

This means that for the functions 'strnicmp','sprintf','malloc',... there
must be generated an underscore as the default is set in OPTIONS/PROJECT
->COMPILER ->COMPILER OUTPUT ->GENERATE UNDERSCORE and for the functions
'srv_config_alloc', 'srv_config_alloc', 'srv_errhandle'... no underscore
may be generated.

There are compiler options to switch this flag (generate underscores or
not) like #pragma but it doesn't work like I want it and I still hope
that there is another way to solve this problem because there are dozens
of srv_... functions in the sample.

If you know a way to solve that problem please let it me know.

Martin

2. Before insert trigger, weird problem

3. Borland C++ compiler with SPB/DC.

4. Database Info!!

5. I need help with Borland C++ compiler for FPW

6. Insufficient Privileges (svrmgrl)

7. BUGS BUGS BUGS (Disappointed with Borland!)

8. HELP(URGENT)...exec and temp table ....

9. Help: Visual C++/ Borland C++ with DBLIB....

10. Fw: Compile and Debug esql/c with Visual C++ 5.0 Or Borland C++ Builder 4.0

11. Makefiles for Borland C 5.5 compiler

12. Borland dbase compiler