Re: [opendbx] Error in odbx.h
Brought to you by:
nose
From: Mariano M. P. <mar...@gm...> - 2008-01-13 21:32:48
|
Hi Norbert Before receiving you answer i found the error. The problem is this: In odbx.h you use uint64_t. This, is in stdint.h . In your odbx.h you have this: #ifdef HAVE_STDINT_H #include <stdint.h> #else #include <sys/types.h> #endif So....if in your client program, you don't define this,it won't work. So, i found 2 solutions: 1) Do the #include <stdint.h> before the #include <odbx.h> in MY program. 2) Define HAVE_STDINT_H in my program, before the #include <odbx.h>. I can defined it just like this: #ifndef HAVE_STDINT_H // if not already defined, then we'll define the symbol here #define HAVE_STDINT_H #endif So...those are the solutions i found. which one do you think is the better ? Just by curious, why can't odbx.h include <stdint.h> always ? whats the problem with this ? i ask just because i know very little about C. No need you answer me while you are in holidays. Just take advantage of it and have a good time. Very thanks. Mariano On Jan 13, 2008 4:35 AM, Norbert Sendetzky <no...@li...> wrote: > Hi Mariano > > > In file included from Prueba.c:11: > > /usr/local/include/odbx.h:206: error: expected '=', ',', ';', 'asm' or > > '__attribute__' before 'odbx_rows_affected' > > make: *** [Prueba.o] Error 1 > > > > > > I saw the header odbx.h at line 206 and it is like this: > > uint64_t odbx_rows_affected( odbx_result_t* result ); > > Seems like uint64_t is not defined for you. Up to OpenDBX 1.3.1 the > inclusion > of the required header defining this type is problematic. Could you try to > add an > > #include <inttypes.h> > > in your file? > > Seems that this error is more problematic than I thought so I will > backport > the change in 1.3.1 to the 1.2 series. > > Thanks > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |