* RE: STATUS_ACCESS_VIOLATION in a embedded sql c program compiled using gcc
@ 2004-08-21 11:44 Sinha, Vinita
0 siblings, 0 replies; 4+ messages in thread
From: Sinha, Vinita @ 2004-08-21 11:44 UTC (permalink / raw)
To: Bras, Gerard, gcc-help
It really is a sample program provided by IBM to connect to DB2 so I am not sure why that should be buggy.
I will try another one and then debug .
Thanks
Vinita
-----Original Message-----
From: Bras, Gerard [mailto:gbras@anacomp.com]
Sent: Friday, August 20, 2004 2:46 PM
To: Sinha, Vinita; gcc-help@gcc.gnu.org
Subject: RE: STATUS_ACCESS_VIOLATION in a embedded sql c program
compiled using gcc
Vinita,
You have at least one bug in your program, a wild guess on my part is that it's a bad pointer, probably uninitialized. You need to make friends with the debug utility, there are some very good ones now which will let you work at the source code level. If you have gcc available then you may very well also have gdb.
In any case this is the kind of problem that needs to be looked at first hand (the source code) and I'm not sure this is the right group for that. I urge you to find an experienced programmer and beg/plead/bribe him/her to walk you through solving this kind of problem. It's one of those skills that will last you a lifetime.
Best of luck,
Gerard
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Sinha, Vinita
Sent: Friday, August 20, 2004 5:13 PM
To: gcc-help@gcc.gnu.org
Subject: STATUS_ACCESS_VIOLATION in a embedded sql c program compiled
using gcc
Hi,
I have a embedded sql C program compiled and bound using gcc version 3.3.1 . It goes againat udb/db2 version 8.1 .
I am getting the following error when trying to execute the program . Is there something I am missing or is it a known issue on which I can get some help .
Exception: STATUS_ACCESS_VIOLATION at eip=610D39A1
eax=00000000 ebx=00000000 ecx=FFFFFFFF edx=FFFFFFFF esi=00000000 edi=FFFFFFFF
ebp=0022D708 esp=0022D704 program=C:\R20006\cPrograms\2006l.exe, pid 2088, thread main
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame Function Args
0022D708 610D39A1 (FFFFFFFF, 0022D7DE, 00401228, 00000001)
0022EE58 610D77FC (0022F208, 6111B310, 00401219, 0022EEA8)
0022EE78 610D6F05 (6111B310, 00401219, 0022EEA4, 0A051000)
0022EE98 610E4837 (00401219, FFFFFFFF, 00000000, 6111B374)
0022EF88 6108DF2F (69636131, 646D696E, 646D696E, 610F3EA0)
0022F058 004010EE (00000001, 0A050190, 0A0500A8, 00000001)
0022F0A8 61005F54 (0022F0C0, FFFFFFFF, 0A016A30, 0A016C44)
0022FF88 6100616B (00000000, 00000000, 00000000, 00000000)
End of stack trace
This is what I used to compile , bind the program and create the executable .
@echo off
if exist "%1.sqx" goto embedded
if exist "%1.sqc" goto embedded
goto non_embedded
:embedded
rem Precompile and bind the program.
call embprep %1 %2 %3 %4
rem Compile the program.
if exist "%1.cxx" goto cpp_emb
goto link_embedded
:cpp_emb
rem Link the program.
:link_embedded
gcc -m32 -I"C:\Program Files\SQLLIB\include" -I"C:\Program Files\SQLLIB\samples\c" -g3 -Wall -c -fmessage-length=0 -osqlexample.o sqlexample.c
gcc -m32 -L"C:\Program Files\SQLLIB\lib" -L"C:\Program Files\SQLLIB\include" -o"2006l.exe" sqlexample.o utilemb.o "C:\Program Files\SQLLIB\lib\db2api.lib"
goto exit
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: STATUS_ACCESS_VIOLATION in a embedded sql c program compiled using gcc
2004-08-21 4:35 Bras, Gerard
@ 2004-12-17 15:33 ` Torsten Lange
0 siblings, 0 replies; 4+ messages in thread
From: Torsten Lange @ 2004-12-17 15:33 UTC (permalink / raw)
To: gcc-help
> -----Original Message-----
> From: gcc-help-owner <at> gcc.gnu.org [mailto:gcc-help-owner <at> >
>cc.gnu.org]On
> Behalf Of Sinha, Vinita
> Sent: Friday, August 20, 2004 5:13 PM
> To: gcc-help <at> gcc.gnu.org
> Subject: STATUS_ACCESS_VIOLATION in a embedded sql c program compiled
> using gcc
>
>
> Hi,
> I have a embedded sql C program compiled and bound using gcc version 3.3.1 .
>It goes againat udb/db2 version
> 8.1 .
> I am getting the following error when trying to execute the program . Is
> there something I am missing or is it a
> known issue on which I can get some help .
>
> Exception: STATUS_ACCESS_VIOLATION at eip=610D39A1
> eax=00000000 ebx=00000000 ecx=FFFFFFFF edx=FFFFFFFF esi=00000000 edi=FFFFFFFF
> .......
> End of stack trace
> .......
>
> Thanks
>
>
Hi,
I've tried the same (using gcc 3.3.3 (cygwin special)) and execution results
in STATUS_ACCESS_VIOLATION too. Then I ported the program to Suse Linux.
In fact I have modified the make file - no source code modifications were
necessary - and
it worked. So the question remains: Is it possible to link a gcc compiled
progam against MSVC compiled library db2api. Are there any additional
parameter for linking?
BTW: I was able to execute the cli samples delivered with DB2 UDB compiled
with gcc on Windows NT (they use db2cli).
Thanks,
Torsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: STATUS_ACCESS_VIOLATION in a embedded sql c program compiled using gcc
@ 2004-08-21 4:35 Bras, Gerard
2004-12-17 15:33 ` Torsten Lange
0 siblings, 1 reply; 4+ messages in thread
From: Bras, Gerard @ 2004-08-21 4:35 UTC (permalink / raw)
To: Sinha, Vinita, gcc-help
Vinita,
You have at least one bug in your program, a wild guess on my part is that it's a bad pointer, probably uninitialized. You need to make friends with the debug utility, there are some very good ones now which will let you work at the source code level. If you have gcc available then you may very well also have gdb.
In any case this is the kind of problem that needs to be looked at first hand (the source code) and I'm not sure this is the right group for that. I urge you to find an experienced programmer and beg/plead/bribe him/her to walk you through solving this kind of problem. It's one of those skills that will last you a lifetime.
Best of luck,
Gerard
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Sinha, Vinita
Sent: Friday, August 20, 2004 5:13 PM
To: gcc-help@gcc.gnu.org
Subject: STATUS_ACCESS_VIOLATION in a embedded sql c program compiled
using gcc
Hi,
I have a embedded sql C program compiled and bound using gcc version 3.3.1 . It goes againat udb/db2 version 8.1 .
I am getting the following error when trying to execute the program . Is there something I am missing or is it a known issue on which I can get some help .
Exception: STATUS_ACCESS_VIOLATION at eip=610D39A1
eax=00000000 ebx=00000000 ecx=FFFFFFFF edx=FFFFFFFF esi=00000000 edi=FFFFFFFF
ebp=0022D708 esp=0022D704 program=C:\R20006\cPrograms\2006l.exe, pid 2088, thread main
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame Function Args
0022D708 610D39A1 (FFFFFFFF, 0022D7DE, 00401228, 00000001)
0022EE58 610D77FC (0022F208, 6111B310, 00401219, 0022EEA8)
0022EE78 610D6F05 (6111B310, 00401219, 0022EEA4, 0A051000)
0022EE98 610E4837 (00401219, FFFFFFFF, 00000000, 6111B374)
0022EF88 6108DF2F (69636131, 646D696E, 646D696E, 610F3EA0)
0022F058 004010EE (00000001, 0A050190, 0A0500A8, 00000001)
0022F0A8 61005F54 (0022F0C0, FFFFFFFF, 0A016A30, 0A016C44)
0022FF88 6100616B (00000000, 00000000, 00000000, 00000000)
End of stack trace
This is what I used to compile , bind the program and create the executable .
@echo off
if exist "%1.sqx" goto embedded
if exist "%1.sqc" goto embedded
goto non_embedded
:embedded
rem Precompile and bind the program.
call embprep %1 %2 %3 %4
rem Compile the program.
if exist "%1.cxx" goto cpp_emb
goto link_embedded
:cpp_emb
rem Link the program.
:link_embedded
gcc -m32 -I"C:\Program Files\SQLLIB\include" -I"C:\Program Files\SQLLIB\samples\c" -g3 -Wall -c -fmessage-length=0 -osqlexample.o sqlexample.c
gcc -m32 -L"C:\Program Files\SQLLIB\lib" -L"C:\Program Files\SQLLIB\include" -o"2006l.exe" sqlexample.o utilemb.o "C:\Program Files\SQLLIB\lib\db2api.lib"
goto exit
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* STATUS_ACCESS_VIOLATION in a embedded sql c program compiled using gcc
@ 2004-08-20 22:07 Sinha, Vinita
0 siblings, 0 replies; 4+ messages in thread
From: Sinha, Vinita @ 2004-08-20 22:07 UTC (permalink / raw)
To: gcc-help
Hi,
I have a embedded sql C program compiled and bound using gcc version 3.3.1 . It goes againat udb/db2 version 8.1 .
I am getting the following error when trying to execute the program . Is there something I am missing or is it a known issue on which I can get some help .
Exception: STATUS_ACCESS_VIOLATION at eip=610D39A1
eax=00000000 ebx=00000000 ecx=FFFFFFFF edx=FFFFFFFF esi=00000000 edi=FFFFFFFF
ebp=0022D708 esp=0022D704 program=C:\R20006\cPrograms\2006l.exe, pid 2088, thread main
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame Function Args
0022D708 610D39A1 (FFFFFFFF, 0022D7DE, 00401228, 00000001)
0022EE58 610D77FC (0022F208, 6111B310, 00401219, 0022EEA8)
0022EE78 610D6F05 (6111B310, 00401219, 0022EEA4, 0A051000)
0022EE98 610E4837 (00401219, FFFFFFFF, 00000000, 6111B374)
0022EF88 6108DF2F (69636131, 646D696E, 646D696E, 610F3EA0)
0022F058 004010EE (00000001, 0A050190, 0A0500A8, 00000001)
0022F0A8 61005F54 (0022F0C0, FFFFFFFF, 0A016A30, 0A016C44)
0022FF88 6100616B (00000000, 00000000, 00000000, 00000000)
End of stack trace
This is what I used to compile , bind the program and create the executable .
@echo off
if exist "%1.sqx" goto embedded
if exist "%1.sqc" goto embedded
goto non_embedded
:embedded
rem Precompile and bind the program.
call embprep %1 %2 %3 %4
rem Compile the program.
if exist "%1.cxx" goto cpp_emb
goto link_embedded
:cpp_emb
rem Link the program.
:link_embedded
gcc -m32 -I"C:\Program Files\SQLLIB\include" -I"C:\Program Files\SQLLIB\samples\c" -g3 -Wall -c -fmessage-length=0 -osqlexample.o sqlexample.c
gcc -m32 -L"C:\Program Files\SQLLIB\lib" -L"C:\Program Files\SQLLIB\include" -o"2006l.exe" sqlexample.o utilemb.o "C:\Program Files\SQLLIB\lib\db2api.lib"
goto exit
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-12-17 15:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-21 11:44 STATUS_ACCESS_VIOLATION in a embedded sql c program compiled using gcc Sinha, Vinita
-- strict thread matches above, loose matches on Subject: below --
2004-08-21 4:35 Bras, Gerard
2004-12-17 15:33 ` Torsten Lange
2004-08-20 22:07 Sinha, Vinita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).