Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Urgent help on using OCCI in Linux.
The gdb stack info:
(gdb) where
#0 0x0042d7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x079f17f5 in raise () from /lib/tls/libc.so.6
#2 0x079f3199 in abort () from /lib/tls/libc.so.6
#3 0x07a254ea in __libc_message () from /lib/tls/libc.so.6
#4 0x07a2bc6f in _int_free () from /lib/tls/libc.so.6
#5 0x07a2bfea in free () from /lib/tls/libc.so.6
#6 0x001affa1 in operator delete () from /usr/lib/libstdc++.so.6
#7 0x00191ccf in std::string::_Rep::_M_destroy () from
/usr/lib/libstdc++.so.6
#8 0x00191f52 in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string () from /usr/lib/libstdc++.so.6
#9 0x080498eb in OCCI_test::book_info (this=0x95f4008, conn=0x9605e14) at
test1.cpp:112
#10 0x0804954d in OCCI_test::run (this=0x95f4008) at test1.cpp:141
#11 0x08048b7d in main () at test1.cpp:234
(gdb)
The strange thing is occi needs to use libstdc++.so.5, but here the stack points to libstdc++.so.6, that is very strange. I must have missed something in the makefile.
"Mathias Waack" <M.Waack_at_gmx.de> wrote in message news:HwBAg.29$TO.882_at_se2-cb104-9.zrh1.ch.colt.net...
> dragon_num_one wrote: > > > Hello there, > > > > I am in urgent need to solve the following problem regarding use Oracle > > OCCI under Linux. > > > > Could someone help me to solve this problem? Is OCCI so difficult touse?
> > > > the crash is caused by using getString(). If I commented out the second > > and third printf(), the program will be having no problem. > > > > while (rs->next()) > > { > > printf("Book ID = %d\n", rs->getInt(1) ); > > printf("Title = %s\n", rs->getString(2).c_str() > > ); > > printf("Auther = %s\n", rs->getString(3).c_str() > > ); > > printf("Price = %d\n", rs->getInt(4) ); > > } > > The usual question in a c++ forum would be: please post a minimal complete > program showing this error. Otherwise try tools like valgrind, maybe it > finds the source for the segfault... > > Mathias
![]() |
![]() |