[please CC: to me when you reply]
we had InterSolve odbc driver 3.01 and oracle 8 on solaris 2.6 and our
applications was compiled with sun CC 4.2. this application was working
fine until we upgrade our os to solaris 2.7 and compiler to sun CC 5.0.
the problem is after recompiling all the application codes with new
compiler on the new os platform, the application program just hangs doing
nothing. after tracking down the problem further, our conclusion is that
somehow odbc 3.01 driver and library (libodbc.so) that we purchased from
InterSolve does not work correctly with new Iostream library from sun CC
5.0 package.
as an experiment, we compiled the "demoodbc" program shipped with odbc
package and was able to run the demo successfully. however, the following
test program which has nothing but "cout" hangs:
- tect.cc ---
#include <stdio.h>
#include <iostream.h>
int main()
{
printf("hello\n");
cout << "world" << endl;
}
- compilation
/opt/SUNWspro/bin/CC -V -mt -o test -I../include test.cc -L../lib -lodbc
-lnsl
CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
ccfe: WorkShop Compilers 5.0 98/12/15 C++ 5.0
cdr_link: WorkShop Compilers 5.0 98/12/15 C++ 5.0
CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
/opt/SUNWspro/bin/../SC5.0/bin/c++filt: WorkShop Compilers 5.0 98/12/15
C++ 5.0
ld: Software Generation Utilities - Solaris/ELF (3.0)
- running
[/usr/pkg/odbc/demo] ./test
hello
^C
the test program spits out the message with "printf", but hangs on the
"cout". since the application program that we have is a C++ code, we can't
avod using the iostream lib.