delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/07/26/05:30:34

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Sandeep <sandy_kulki AT rediffmail DOT com>
Subject: =?utf-8?b?U1RBVFVTX0FDQ0VTU19WSU9MQVRJT04=?= in Cygwin 3.3.1 on Win2k using ESQL on Ingres 2.6
Date: Wed, 26 Jul 2006 06:09:47 +0000 (UTC)
Lines: 42
Message-ID: <loom.20060726T075350-352@post.gmane.org>
References: <4 DOT 3 DOT 2 DOT 7 DOT 2 DOT 20040103092732 DOT 02db6dd0 AT mailhost DOT esva DOT net> <01e101c3d1f1$9bc8d6a0$29750252 AT fuji> <4 DOT 3 DOT 2 DOT 7 DOT 2 DOT 20040103092732 DOT 02db6dd0 AT mailhost DOT esva DOT net> <4 DOT 3 DOT 2 DOT 7 DOT 2 DOT 20040103203307 DOT 02db8880 AT mailhost DOT esva DOT net>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019