occi - Bytes class [message #94399] |
Thu, 07 October 2004 01:24 |
amit goel
Messages: 20 Registered: March 2004
|
Junior Member |
|
|
We need to store a structure as it is in DB. FOr that weused Bytes class from occi. The coulumn data type was used as VARCHAR2. The probloem is that the size of the VARCHAR2 required is always double than the actual strucure size.
What can be sone to store a sturcture as is in DB without any extra memory usage, or something special needs to be done with byte calss. Please help
The sample code is
SmsMsg is a user defined structure.
Bytes *byte_object;
SmsMsg sms_msg;
byte_object = new Bytes((unsigned char *)&sms_msg, sizeof(SmsMsg),0,NULL);
stmt->setBytes(2,*byte_object);
|
|
|
Linking problem:- OCCI /C++ linux(redhat 9) [message #150964 is a reply to message #94399] |
Mon, 12 December 2005 05:55 |
manav.sah
Messages: 15 Registered: September 2005 Location: India
|
Junior Member |
|
|
hi!
i m new in OCI/OCCI...
i m trying to compile a simple occi/c++ program in redhat linux 9 with oracle 9i.
i m compiling the program as
g++ ./occi1.cc -I/opt/ora9/product/9.2/rdbms/demo/ -I/opt/ora9/product/9.2/rdbms/public/ -c
and linking as :-
g++ ./occi1.o /opt/ora9/product/9.2/lib/libocci9.a /opt/ora9/product/9.2/lib/libclntsh.so
[./occi1.o(.gnu.linkonce.t._ZN7occidmlC1ESsSsSs+0x20): In function `occidml::occidml[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
: undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned), void* (*)(void*, void*, unsigned), void (*)(void*, void*))'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `cerr'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__pure_virtual'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `exception type_info function'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__cp_push_exception'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `endl(ostream &)'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__uncatch_exception'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__out_of_range(char const *)'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__rtti_user'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__ctype_toupper'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__rtti_si'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__check_eh_spec'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__throw'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `ostream::operator<<(char const *)'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `terminate(void)'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__start_cp_handler'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__cp_pop_exception'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `exception type_info node'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__builtin_vec_new'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__eh_rtime_match'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__length_error(char const *)'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__builtin_vec_delete'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `exception virtual table'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__rtti_class'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__builtin_delete'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__builtin_new'
/opt/ora9/product/9.2/lib/libocci.so: undefined reference to `__eh_alloc'
collect2: ld returned 1 exit status
pls help me to get over these error...
and guide me how to link the occi program...
is there any other file needed..
thanks
Best Regards
Manav Sah
|
|
|