Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

compiling dco2.c with Oracle 10g using mingw on Windows XP - interesting errror

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


mmhamze at pleiades

Dec 5, 2007, 4:32 PM

Post #1 of 4 (3505 views)
Permalink
compiling dco2.c with Oracle 10g using mingw on Windows XP - interesting errror

I compiled dco2.c on Solaris 9 with Oracle 9i and Oracle 10g with no
problems.
On Windows XP, compiling dco2.c with Oracle9i is fine.

With Oracle 10g on Windows XP (using Mingw C compiler), I ran into following
errors:
#####################
In file included from C:/oracle/ora10/oci/include/oci.h:394,
from dco2.c:109:
C:/oracle/ora10/oci/include/oratypes.h:97: error: syntax error before
"oraub8"
C:/oracle/ora10/oci/include/oratypes.h:97: warning: data definition has no
type
or storage class
C:/oracle/ora10/oci/include/oratypes.h:98: error: syntax error before
"orasb8"
C:/oracle/ora10/oci/include/oratypes.h:98: warning: data definition has no
type
or storage class
C:/oracle/ora10/oci/include/oratypes.h:99: error: syntax error before "ub8"
C:/oracle/ora10/oci/include/oratypes.h:99: warning: data definition has no
type
or storage class
C:/oracle/ora10/oci/include/oratypes.h:100: error: syntax error before "sb8"
C:/oracle/ora10/oci/include/oratypes.h:100: warning: data definition has no
type
or storage class
###################

Culprit is this, in oratypes.h:

#define ORAXB8_DEFINED
#ifndef lint
typedef unsigned _int64 oraub8;
typedef signed _int64 orasb8;
typedef oraub8 ub8;
typedef orasb8 sb8;
#else
# define ub8 oraub8
# define sb8 orasb8
# define oraub8 unsigned _int64
# define orasb8 signed _int64
#endif /* !lint */

---------------------------

_int64 ????????????????????

Changing this to __int64 solved the problem, and dco2.c compiled fine.

_int64 caused the problem in oratypes.h of Oracle10g.

Can this be fixed via some define in dco2.c so that I do not have to change
oratypes.h (_int64 to __int64)?

Thanks,
Maan



_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db


lists at zopyx

Dec 5, 2007, 7:29 PM

Post #2 of 4 (3325 views)
Permalink
Re: compiling dco2.c with Oracle 10g using mingw on Windows XP - interesting errror [In reply to]

You might consider using cx_oracle as an alternative to DCO2. cx_oracle
could be integrated with Zope as an DA using SQLAlchemyDA (although
untested). DCO2 is pretty old and seems to be unmaintained.

-aj

--On 5. Dezember 2007 18:32:14 -0600 "Maan M. Hamze" <mmhamze [at] pleiades>
wrote:

> I compiled dco2.c on Solaris 9 with Oracle 9i and Oracle 10g with no
> problems.
> On Windows XP, compiling dco2.c with Oracle9i is fine.
>
> With Oracle 10g on Windows XP (using Mingw C compiler), I ran into
> following errors:
>#####################
> In file included from C:/oracle/ora10/oci/include/oci.h:394,
> from dco2.c:109:
> C:/oracle/ora10/oci/include/oratypes.h:97: error: syntax error before
> "oraub8"
> C:/oracle/ora10/oci/include/oratypes.h:97: warning: data definition has no
> type
> or storage class
> C:/oracle/ora10/oci/include/oratypes.h:98: error: syntax error before
> "orasb8"
> C:/oracle/ora10/oci/include/oratypes.h:98: warning: data definition has no
> type
> or storage class
> C:/oracle/ora10/oci/include/oratypes.h:99: error: syntax error before
> "ub8" C:/oracle/ora10/oci/include/oratypes.h:99: warning: data definition
> has no type
> or storage class
> C:/oracle/ora10/oci/include/oratypes.h:100: error: syntax error before
> "sb8" C:/oracle/ora10/oci/include/oratypes.h:100: warning: data
> definition has no type
> or storage class
>###################
>
> Culprit is this, in oratypes.h:
>
># define ORAXB8_DEFINED
># ifndef lint
> typedef unsigned _int64 oraub8;
> typedef signed _int64 orasb8;
> typedef oraub8 ub8;
> typedef orasb8 sb8;
># else
># define ub8 oraub8
># define sb8 orasb8
># define oraub8 unsigned _int64
># define orasb8 signed _int64
># endif /* !lint */
>
> ---------------------------
>
> _int64 ????????????????????
>
> Changing this to __int64 solved the problem, and dco2.c compiled fine.
>
> _int64 caused the problem in oratypes.h of Oracle10g.
>
> Can this be fixed via some define in dco2.c so that I do not have to
> change oratypes.h (_int64 to __int64)?
>
> Thanks,
> Maan
>
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB [at] zope
> http://mail.zope.org/mailman/listinfo/zope-db



--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info [at] zopyx - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


mmhamze at pleiades

Dec 6, 2007, 1:31 PM

Post #3 of 4 (3317 views)
Permalink
RE: compiling dco2.c with Oracle 10g using mingw on Windows XP - interesting errror [In reply to]

cx_oracle is very good, but I have used dcoracle2 for years and am used to
it.
Also, dcoracle2 is still working fine into Oracle 10, specially for those
who use it to perform routine operations in Oracle (sql, procedures etc..).

There has been work to fix things in dco2.c and add things.

As for the issue I described in this post, it seems to be resolved with the
Following define in dco2 (to be used in the source before including oci.h
which in turn includes oratypes.h):

//oratpyes.h with Oracle10g client for Windows
//uses _int64 instead of __int64
//Following resolves issue when using MinGW32 which uses
// __int64 as a long long typedef.
//User may want to change the compiler define depending on how compiler
//handles this issue. This works with MinGW32. Your mileage may vary.

#ifdef ORACLE10g
#if (defined(WIN32) && defined(__GNUC__))
#ifndef _int64
#define _int64 long long
#endif
#endif
#endif
#include <oci.h>

Maan

>>You might consider using cx_oracle as an alternative to DCO2. cx_oracle
>>could be integrated with Zope as an DA using SQLAlchemyDA (although
>>untested). DCO2 is pretty old and seems to be unmaintained.

-aj

--On 5. Dezember 2007 18:32:14 -0600 "Maan M. Hamze" <mmhamze [at] pleiades>
wrote:

> I compiled dco2.c on Solaris 9 with Oracle 9i and Oracle 10g with no
> problems.
> On Windows XP, compiling dco2.c with Oracle9i is fine.
>
> With Oracle 10g on Windows XP (using Mingw C compiler), I ran into
> following errors:
>#####################
> In file included from C:/oracle/ora10/oci/include/oci.h:394,
> from dco2.c:109:
> C:/oracle/ora10/oci/include/oratypes.h:97: error: syntax error before
> "oraub8"
> C:/oracle/ora10/oci/include/oratypes.h:97: warning: data definition has no
> type
> or storage class
> C:/oracle/ora10/oci/include/oratypes.h:98: error: syntax error before
> "orasb8"
> C:/oracle/ora10/oci/include/oratypes.h:98: warning: data definition has no
> type
> or storage class
> C:/oracle/ora10/oci/include/oratypes.h:99: error: syntax error before
> "ub8" C:/oracle/ora10/oci/include/oratypes.h:99: warning: data definition
> has no type
> or storage class
> C:/oracle/ora10/oci/include/oratypes.h:100: error: syntax error before
> "sb8" C:/oracle/ora10/oci/include/oratypes.h:100: warning: data
> definition has no type
> or storage class
>###################
>
> Culprit is this, in oratypes.h:
>
># define ORAXB8_DEFINED
># ifndef lint
> typedef unsigned _int64 oraub8;
> typedef signed _int64 orasb8;
> typedef oraub8 ub8;
> typedef orasb8 sb8;
># else
># define ub8 oraub8
># define sb8 orasb8
># define oraub8 unsigned _int64
># define orasb8 signed _int64
># endif /* !lint */
>
> ---------------------------
>
> _int64 ????????????????????
>
> Changing this to __int64 solved the problem, and dco2.c compiled fine.
>
> _int64 caused the problem in oratypes.h of Oracle10g.
>
> Can this be fixed via some define in dco2.c so that I do not have to
> change oratypes.h (_int64 to __int64)?
>
> Thanks,
> Maan
>
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB [at] zope
> http://mail.zope.org/mailman/listinfo/zope-db



--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tbingen - Germany
Web: www.zopyx.com - Email: info [at] zopyx - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschftsfhrer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


dieter at handshake

Dec 7, 2007, 10:57 AM

Post #4 of 4 (3311 views)
Permalink
Re: compiling dco2.c with Oracle 10g using mingw on Windows XP - interesting errror [In reply to]

Maan M. Hamze wrote at 2007-12-5 18:32 -0600:
>I compiled dco2.c on Solaris 9 with Oracle 9i and Oracle 10g with no
>problems.
>On Windows XP, compiling dco2.c with Oracle9i is fine.
>
>With Oracle 10g on Windows XP (using Mingw C compiler), I ran into following
>errors:
>#####################
>In file included from C:/oracle/ora10/oci/include/oci.h:394,
> from dco2.c:109:
>C:/oracle/ora10/oci/include/oratypes.h:97: error: syntax error before
>"oraub8"

As you can see, the compiler complains about things in the
Oracle header files -- not in DCOracle2 itself.

While it is possible that the caller is responsible,
you should start to investigate in the Oracle header files.

I is well possible that the Oracle headers no require the called
to include an additional header and that DCO2 does not know yet.



--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB [at] zope
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.