Cannot get sample XP source code to compile?

Cannot get sample XP source code to compile?

Post by Steve Kas » Sat, 02 Nov 2002 00:45:34



Do you have Srv.h included in your project?

SK


> I am trying to create the sample XP's listed in the DevTools\Samples\ODS
> folder and I am getting a compiler error with <sql.h>. I have followed
> directions in BOL and have changed the directories for includes and
> libraries and even linked the .lib file.

> I have searched the newsgroups and web and have found a few other people
> that have had this problem but no solution. Any help?

> SYSTEM:
> VC++ 6.0 Professional Ed.
> SQL Server 2000 sp2

> Here are the errors from the 'xp_hello' sample (same for all):

> --------------------Configuration: xp_hello - Win32
> Debug--------------------
> Compiling...
> xp_hello.c
> C:\Documents and Settings\Administrator\Desktop\Writing Extended
> Procs\ods\xp_hello\xp_hello.c(42) : error C2065: 'ODS_VERSION' : undeclared
> identifier
> C:\Documents and Settings\Administrator\Desktop\Writing Extended
> Procs\ods\xp_hello\xp_hello.c(69) : warning C4013: 'srv_paraminfo'
> undefined; assuming extern returning int
> C:\Documents and Settings\Administrator\Desktop\Writing Extended
> Procs\ods\xp_hello\xp_hello.c(84) : error C2065: 'SRVBIGVARCHAR' :
> undeclared identifier
> C:\Documents and Settings\Administrator\Desktop\Writing Extended
> Procs\ods\xp_hello\xp_hello.c(84) : error C2065: 'SRVBIGCHAR' : undeclared
> identifier
> C:\Documents and Settings\Administrator\Desktop\Writing Extended
> Procs\ods\xp_hello\xp_hello.c(135) : warning C4013: 'srv_paramsetoutput'
> undefined; assuming extern returning int
> Error executing cl.exe.

> xp_hello.dll - 3 error(s), 2 warning(s)

 
 
 

Cannot get sample XP source code to compile?

Post by Bigtog » Sat, 02 Nov 2002 06:40:19


No - for some reason, the SQL Server samples did not have this. I included
it and now I get even more errors:

--------------------Configuration: xp_hello - Win32
Debug--------------------
Compiling...
xp_hello.c
c:\program files\microsoft visual studio\vc98\include\sqltypes.h(111) :
error C2371: 'RETCODE' : redefinition; different basic types
        c:\program files\microsoft visual studio\vc98\include\srvdbtyp.h(17)
: see declaration of 'RETCODE'
c:\documents and settings\administrator\desktop\writing extended
procs\ods\xp_hello\xp_hello.c(43) : error C2065: 'ODS_VERSION' : undeclared
identifier
c:\documents and settings\administrator\desktop\writing extended
procs\ods\xp_hello\xp_hello.c(70) : warning C4013: 'srv_paraminfo'
undefined; assuming extern returning int
c:\documents and settings\administrator\desktop\writing extended
procs\ods\xp_hello\xp_hello.c(85) : error C2065: 'SRVBIGVARCHAR' :
undeclared identifier
c:\documents and settings\administrator\desktop\writing extended
procs\ods\xp_hello\xp_hello.c(85) : error C2065: 'SRVBIGCHAR' : undeclared
identifier
c:\documents and settings\administrator\desktop\writing extended
procs\ods\xp_hello\xp_hello.c(136) : warning C4013: 'srv_paramsetoutput'
undefined; assuming extern returning int
Error executing cl.exe.

xp_hello.dll - 4 error(s), 2 warning(s)


> Do you have Srv.h included in your project?

> SK


> > I am trying to create the sample XP's listed in the DevTools\Samples\ODS
> > folder and I am getting a compiler error with <sql.h>. I have followed
> > directions in BOL and have changed the directories for includes and
> > libraries and even linked the .lib file.

> > I have searched the newsgroups and web and have found a few other people
> > that have had this problem but no solution. Any help?

> > SYSTEM:
> > VC++ 6.0 Professional Ed.
> > SQL Server 2000 sp2

> > Here are the errors from the 'xp_hello' sample (same for all):

> > --------------------Configuration: xp_hello - Win32
> > Debug--------------------
> > Compiling...
> > xp_hello.c
> > C:\Documents and Settings\Administrator\Desktop\Writing Extended
> > Procs\ods\xp_hello\xp_hello.c(42) : error C2065: 'ODS_VERSION' :
undeclared
> > identifier
> > C:\Documents and Settings\Administrator\Desktop\Writing Extended
> > Procs\ods\xp_hello\xp_hello.c(69) : warning C4013: 'srv_paraminfo'
> > undefined; assuming extern returning int
> > C:\Documents and Settings\Administrator\Desktop\Writing Extended
> > Procs\ods\xp_hello\xp_hello.c(84) : error C2065: 'SRVBIGVARCHAR' :
> > undeclared identifier
> > C:\Documents and Settings\Administrator\Desktop\Writing Extended
> > Procs\ods\xp_hello\xp_hello.c(84) : error C2065: 'SRVBIGCHAR' :
undeclared
> > identifier
> > C:\Documents and Settings\Administrator\Desktop\Writing Extended
> > Procs\ods\xp_hello\xp_hello.c(135) : warning C4013: 'srv_paramsetoutput'
> > undefined; assuming extern returning int
> > Error executing cl.exe.

> > xp_hello.dll - 3 error(s), 2 warning(s)


 
 
 

Cannot get sample XP source code to compile?

Post by Bill Hollinshead [MS » Wed, 06 Nov 2002 01:59:26


Hi,

Just unzipping is not enough <g>. See the other folders under \devtools, in
particular the \include and \lib folders. Also, from a command prompt, make
sure your dev box's SET environment variable has INCLUDE and LIB paths that
are pointing to the correct location (with the most recent versions) and
not some other location (with earlier versions).

Thanks,

Bill Hollinshead
Microsoft, SQL Server

This posting is provided "AS IS" with no warranties, and confers no
rights. Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

 
 
 

1. cannot find source of error compiling procedure.

Platform: Oracle 8.0.5 SE on NT 4, sp6

I'm building a test version of one of our production db's. I did a "schema
extraction" to get all of the tables, indexes, procedures, etc. from a
particular schema.  When I executed this DDL on the test database, everything
went will except for compiling a few of the procedures.  On the procedures, I
got the error "ORA-04054: database link LN_NMMPDB.WORLD does not exist"

OK, that refers to a link to a production database, so I'll just change to
reference to point to the proper link in the test environment.  BUT . . .  I
can't find any occurance of the string "LN_NMMPDB" anywhere in the DDL!

So if the DDL has no mention of LN_NMMPDB, why would the compile fail because
LN_NMMPDB does not exist?

Sitting on a park bench, feeding the birds and drooling on myself is looking
better all the time . . .

--
Ed Stevens
(Opinions expressed do not necessarily represent those of my employer.)

2. Performance problems following Convsion from Access 2000 to SQL7.0

3. VB Samples, APIs, Functions, Source-Codes,...

4. WANTED: Papers on Parallel Sorting Algorithms

5. Database source code samples

6. Help - "cannot open user default database. Login failed"

7. How to compile postgres source code in VC++

8. bcp format file

9. dBase Win: Want Samples Source Code

10. Source code for MDX Sample Application

11. Good Sample Source Code

12. How to compile postgres source code in VC++

13. Vb Stuff: Samples, Source-Codes, Freeware