Re: [Orclib-devel] trouble building the C++ example code
Open source C and C++ library for accessing Oracle Databases
Brought to you by:
vince_del_paris
From: Christoph D. <du...@me...> - 2015-02-17 14:44:35
|
I gave it a try on a new SLES12 installation. The code now does compile with g++ (4.8.3) without warning. clang 3.5.1 is not quite happy, however: 1) before class Element (ocilib.hpp, line 4610) a forward declaration of class Iterator is needed; otherwise the friend declaration a few lines below fails class Iterator; (add around line 4602) 2) /tmp/ocilib/include/ocilib_impl.hpp:2649:46: error: no member named 'GetContent' in 'Lob<TLobObjectType, TLobOracleType>' return Lob<TLobObjectType, TLobOracleType>::GetContent(); There is no GetContent in Lob, however... there is a conversion operator, though: operator TLobObjectType() const; I am not sure, whether the GetContent is missing, the conversion operator should be renamed to GetContent... 3) warnings... please check, if this is a problem soft@sles12test:/labor/source/pakete/qt5> clang++ -c -Wall -I /tmp/ocilib/include -o /tmp/ocilibtest.o /tmp/ocilibtest.cpp In file included from /tmp/ocilibtest.cpp:36: In file included from /tmp/ocilib/include/ocilib.hpp:8185: /tmp/ocilib/include/ocilib_impl.hpp:2277:38: warning: variable 'minutes' is uninitialized when used here [-Wuninitialized] SetDateTime(year, month, day, hour, minutes, seconds, milliseconds); ^~~~~~~ /tmp/ocilib/include/ocilib_impl.hpp:2274:47: note: initialize the variable 'minutes' to silence this warning int tmpYear, tmpMonth, tempDay, hour, minutes, seconds, milliseconds; ^ = 0 /tmp/ocilib/include/ocilib_impl.hpp:2277:47: warning: variable 'seconds' is uninitialized when used here [-Wuninitialized] SetDateTime(year, month, day, hour, minutes, seconds, milliseconds); ^~~~~~~ /tmp/ocilib/include/ocilib_impl.hpp:2274:56: note: initialize the variable 'seconds' to silence this warning int tmpYear, tmpMonth, tempDay, hour, minutes, seconds, milliseconds; ^ = 0 /tmp/ocilib/include/ocilib_impl.hpp:2277:56: warning: variable 'milliseconds' is uninitialized when used here [-Wuninitialized] SetDateTime(year, month, day, hour, minutes, seconds, milliseconds); ^~~~~~~~~~~~ /tmp/ocilib/include/ocilib_impl.hpp:2274:70: note: initialize the variable 'milliseconds' to silence this warning int tmpYear, tmpMonth, tempDay, hour, minutes, seconds, milliseconds; ^ = 0 It would be great if you could make the small fixes as to support clang as well. (And maybe add a note that the C++ interface requires a somewhat newish compiler.) Best regards -- Christoph Duelli Dipl.-Inf. Software-Entwickler Tel.: +49 8238/9611-38 Fax: +49 8238/9611-99 mailto: chr...@me... --------------------------------------------------------------------------------- MELOS-Medizinische Labor-Organisations-Systeme GmbH Franz-Beer-Straße 6 86459 Gessertshausen Tel.: +49 8238/9611-0 Fax: +49 8238/9611-99 mailto: in...@me... URL: www.melosgmbh.de Amtsgericht Augsburg, HRB 13226 USt-IdNr. DE 130 958 139 Geschäftsführer: Herbert Mayer, Andreas Manntz, Helmut Welsch -------------------------------------------- This e-mail (including any attachments) is confidential and may be privileged. If you have received it by mistake, please notify the sender by e-mail and delete it from your system. Any unauthorised use or dissemination of this e-mail or its contents in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. MELOS GmbH shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt. MELOS GmbH does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. |