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]

cygwin 1.5.12-1, g++ 3.3.3 and DB2 UDB DLLs


Hi,

I've got a problem using embedded SQL with cygwin 1.5.12-1, g++ (GCC) 3.3.3
(cygwin special) and DB2 UDB 8.1.4. My platform is Windows NT 4 SP 6.
Preprocessing the embedded SQL-code works and I am able to compile the
generated code and link the program with db2api.lib! (I thought that I have
to build a Cygwin compatible import library via nm and dlltool, but
db2app.dll, db2sys.dll, db2wint.dll and the others are stripped - so I tried
the original import library.)

  gcc -m32 -O0 -ggdb -g3 -Wall -c -obuild/cpp/compiledir/debug/Test.o
Test.cpp

  g++ -obuild/cpp/compiledir/debug/Test.exe
build/cpp/compiledir/debug/Test.o  
  -Le:/Programme/SQLLIB/lib -ldb2api -Le:/Programme/SQLLIB/lib -ldb2cli

Program execution results in a core dump: 

  Exception: STATUS_ACCESS_VIOLATION at eip=00040818
  eax=0022ED60 ebx=00000004 ecx=0022E524 edx=00000000 esi=61118080
edi=61005CBC
  ebp=0022EE48 esp=0022E4DC program=e:\build\cpp\compiledir\debug\Test.exe,
pid 500, thread main
  cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
  Stack trace:
  Frame     Function  Args
  0022EE48  00040818  (0022EF90, 0022EF20, 33333333, 3FFB3333)
  0022EFC8  0040388D  (00000001, 61790404, 100300A8, 0022F020)
  0022F008  61006145  (0022F020, 006E0069, 00200067, 0072004F)
  0022FF88  61006350  (00000000, 00000000, 00000000, 00000000)
  End of stack trace 

I've also tested linking with -mno-cygwin and I've got the typical Windows
message box reporting an 'Access Violation'.
Surprisingly I was able to execute the cli samples delivered with DB2 UDB
compiled with gcc on Windows NT (they use db2cli.lib).
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!
(Working with Oracle and embedded SQL (Oracle 9.2.0.4.0, using Orasql9.lib)
results in core dump too.)

Are there any additional parameter for compiling/linking or is there another
way to create the Cygwin compatible import libs?

Thanks, 
Torsten

--
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]