Re: [opendbx] Error in odbx.h
Brought to you by:
nose
From: Mariano M. P. <mar...@gm...> - 2008-01-13 22:38:48
|
Hi Norbert, Right now i can't tell you if every works well because i am just trying to do a simple example. I can tell you if the program i show you in the other mails, compiles. And yes, it does. If i put #include <inttypes.h> before #include <odbx.h> without defining HAVE_STDINT_H it compiles. However, if i try to use any function, i have an error. This error happen with all the solutions we talk, because it has nothing to do with the other problem. I the program i show you, i add the lines to connect to a database, just like this: #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <odbx.h> int main(void) { puts("Hello World!!"); int err; odbx_t* handle; if( ( err = odbx_init( &handle, "mysql", "127.0.0.1", "" ) ) < 0 ) { fprintf( stderr, "odbx_init(): %s\n", odbx_error( handle, err ) ); return err; } return EXIT_SUCCESS; } And i have the following error: **** Build of configuration Linux GCC for project Prueba **** make all cc -c -o Prueba.o Prueba.c g++ -o Prueba Prueba.o Prueba.o: In function `main': Prueba.c:(.text+0x3c): undefined reference to `odbx_init' Prueba.c:(.text+0x57): undefined reference to `odbx_error' collect2: ld returned 1 exit status make: *** [Prueba] Error 1 it doesn't find the reference....do you know what can it be ? thanks, mariano On 1/13/08, Norbert Sendetzky <no...@li...> wrote: > > Hi Mariano > > > 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. > > The problem is that uint64_t is defined in different headers on different > platforms (Linux, Solaris, etc). As far as I understand inttypes.h is > available on all platforms and we are no longer dependent on using > automake > or defining symbols ourselves. Could you test if everything works without > errors with OpenDBX 1.3.4? If yes, I wll backport the change to the stable > 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 > > > |