This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

STATUS_ACCESS_VIOLATION in Cygwin 3.3.1 on Win2k using ESQL on Ingres 2.6


Hi,
I have following configurations: Win2k SP4, Cygwin 3.3.1, Ingres 2.6
I have an embedded sql file, contents are as follows:

/* my_sim_exec.sc */
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
	EXEC SQL INCLUDE SQLCA;
							
	EXEC SQL BEGIN DECLARE SECTION;
		char dbname[30];
		int  session;
	EXEC SQL END DECLARE SECTION;
	
	strcpy (dbname, argv[1]);		
	EXEC SQL INQUIRE_SQL(:session = session);	
	session++;    
	EXEC SQL connect :dbname session :session;	
	return(0);
}

I am doing ESQLC on this file to get my_sim_exec.c. And then compiling using 
gcc to produce .o, as follows: gcc -v -Wall -Wno-unused -c -g -ID:\\Cygwin-
X1_new\\usr\\include my_sim_exec.c -o my_sim_exec.o

Then I am linking .o into .exe as follows: gcc my_sim_exec.o 
C:\IngresII\ingres\lib\ingres.lib C:\IngresII\ingres\lib\esqlc.lib -LD:\Cygwin-
X1_new\lib\w32api -lm -lc -o my_sim_exec

It builds the exe and when I try to run that exe (my_sim_exec my_db_name) it 
gives the following error:

100 [main] sim_exec 4556 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
1769 [main] sim_exec 4556 open_stackdumpfile: Dumping stack trace to 
sim_exec.exe.stackdump

Can some one help me to solve this? All I am doing in the .sc file above is to 
inquire the session and then connect to the existing db.

Thanks in advance.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]