all groups > sql server (alternate) > january 2004 >
You're in the

sql server (alternate)

group:

weird error when precompiling genwin.mak with nsqlprep


weird error when precompiling genwin.mak with nsqlprep akumar1 NO[at]SPAM mn.rr.com
1/31/2004 2:18:45 PM
sql server (alternate):
I am trying to compile the sample program genwin.sqc, using nsqlprep
which is used to precompile embedded sql in C. I am getting weird
errors and that is because windows.h is included in the genwin.sqc
file. I am using

Setting the lib and include path:

set INCLUDE=C:\Program Files\Microsoft SQL
Server\80\Tools\DevTools\include;C:\Program Files\Microsoft SQL
Server\80\Tools\DevTools\Samples\esqlc;%include%
set LIB=C:\Program Files\Microsoft SQL
Server\80\Tools\DevTools\lib;%lib%


Precompiling:

nsqlprep genwin /NOACCESS

Microsoft (R) Embedded SQL for C Pre-Compiler. Version 8.00.194.
Copyright (c) Microsoft Corp 1993-1998. All rights reserved.
Warning: genwin.sqc, line 7978: syntax error.
}
Warning: genwin.sqc, line 7987: syntax error.
}
Warning: genwin.sqc, line 71840: syntax error.
__declspec void __stdcall DragAcceptFiles(HWND,BOOL
Warning: genwin.sqc, line 71842: syntax error.
__declspec HINSTANCE __stdcall ShellExecuteA(HWND hwnd
Warning: genwin.sqc, line 71843: syntax error.
__declspec HINSTANCE __stdcall ShellExecuteW(HWND hwnd
Warning: genwin.sqc, line 71858: syntax error.
__declspec INT __stdcall ShellAboutA(HWND hWnd
Warning: genwin.sqc, line 71859: syntax error.
__declspec INT __stdcall ShellAboutW(HWND hWnd
Warning: genwin.sqc, line 71941: syntax error.
HWND
Warning: genwin.sqc, line 71946: syntax error.

As soon as i remove windows.h, the errors disappear. It seems nsqlprep
doesnt like windows.h. How do i get over this.
Would really appreciate if u can help me out.

versions:
OS: windows 2000 server service pack 2
VC++: version 6.0
SQLserver 2000: 8.00.194, RTM, Standard edition

Thank you
Re: weird error when precompiling genwin.mak with nsqlprep Erland Sommarskog
1/31/2004 11:50:41 PM
amit (akumar1@mn.rr.com) writes:
[quoted text, click to view]

Since windows.h is not in any of the directories above, you must have it
somewhere else.

I have also had problems with getting funny errors with various include
files for a DB-Library module that I have. Since I am not really a C
programmer, I just moved the include files around, until I had things
working.

As I recall, when I started to use VC7, I got into new problems. So, if
you are using VS .Net, but also have VC6 available, try using VC6 instead.

--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button