Home » Developer & Programmer » Precompilers, OCI & OCCI » Compile problem with pro*c in MS VC++ 6.0
Compile problem with pro*c in MS VC++ 6.0 [message #93620] Mon, 12 August 2002 08:20 Go to next message
sn008
Messages: 7
Registered: July 2002
Junior Member
Hello All,
I'm having problem compiling the pro*c code in VC++ 6.0. I'm a novice
in database-vc++ integerationn and is the first time setup and
compile being run by me. Looks like a syntax error due to setup
problem in vc++, I would appreciate if anybody could send a procedure
to setup and compile program in vc++ for both pro*c and oci methods.

Thanks in Advance.
- sn008

Error Log:
--------------------Configuration: ProcEx - Win32 Debug---------------
-----
Compiling...
ProcEx.cpp
c:my edumyprojectsprocexprocex.cpp(12) : error C2146: syntax
error : missing ';' before identifier 'SQL'
c:my edumyprojectsprocexprocex.cpp(12) : error C2501: 'EXEC' :
missing storage-class or type specifiers
c:my edumyprojectsprocexprocex.cpp(12) : fatal error C1004:
unexpected end of file found
Error executing cl.exe.

ProcEx.obj - 3 error(s), 0 warning(s)

Program:
/* Include heading files, i.e., C .h files or your own .h files */
#include <stdio.h>
#include <string.h>

/* Include the SQL communication Area. */
/* You can use #include or EXEC SQL INCLUDE. */
#include <sqlca.h>

#define ID_len 20

/* Declare variables */
EXEC SQL BEGIN DECLARE SECTION; /* Line 12 */
varchar myID[[ID_len]], mypasswd[[ID_len]];
EXEC SQL END DECLARE SECTION;

struct {
varchar name[[30]];
int stid;
int class;
VARCHAR major[[4]];
} stu_rec;
/* Indicator var: indicate the status for variables on either input
or output*/
struct { short name_ind, stid_ind, class_ind, major_ind;} stu_ind;

/* counter for total students */
int total_students = 0;

/* Declare functions */
void get_username();
void sql_error();

...main()...continued.
Re: please inform me something about VC++ 6.0 [message #93701 is a reply to message #93620] Fri, 18 October 2002 00:51 Go to previous messageGo to next message
Subhra
Messages: 2
Registered: October 2002
Junior Member
Utility of VC++ 6.0
Re: please inform me something about VC++ 6.0 [message #93778 is a reply to message #93620] Sat, 11 January 2003 23:02 Go to previous messageGo to next message
S.Balakrishnakumar
Messages: 1
Registered: January 2003
Junior Member
Please inform me something about VC++ 6.0
problem in compiling pro*c Programe on win XP [message #94031 is a reply to message #93620] Fri, 17 October 2003 03:23 Go to previous messageGo to next message
Manish
Messages: 79
Registered: December 2000
Member
i am using oracle 9i on window XP env. Also MS VC++6
i want to compile the PRO*C program
Can Some One Help me in configering both pro*C and
MS C++

Thank

Manish
Request [message #94364 is a reply to message #94031] Tue, 07 September 2004 02:45 Go to previous messageGo to next message
Ravi Khurana
Messages: 2
Registered: September 2004
Junior Member
Hello Manish,

I want To Use Oracle 9i with C/C++.
Please Give me Some Examples of C/C++ Program. And if U can Send me Some Documentation of Pro*C Then Plz Send it through Email.

Regards,
Ravi Khurana
Re: Compile problem with pro*c in MS VC+ 6.0 [message #94396 is a reply to message #93620] Wed, 06 October 2004 04:28 Go to previous message
Srinivas
Messages: 138
Registered: June 2000
Senior Member
Hi,
Add the oracle library into your project like
.C file
.PC file
and oraSQL9.lib for oracle 9i version.
or oraSQL8.lib for oracle 8i version.....

Check and let me know the status....

Regards,
srinivas
Previous Topic: OTT for Oracle 9i (on windows 2000) use OCCI
Next Topic: A Simple Program of Pro*c with Oracle 9i Compatable
Goto Forum:
  


Current Time: Fri Mar 29 00:16:31 CDT 2024