From boris at codesynthesis.com Wed Nov 3 08:11:51 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 3 08:04:35 2010 Subject: [odb-users] [BUG] Missing paths in Automake build system files In-Reply-To: <4CCDE007.2080103@gmail.com> References: <4CCC667A.9000700@gmail.com> <4CCDE007.2080103@gmail.com> Message-ID: Hi Amr, In the future please keep your replies CC'ed to the odb-users mailing list as discussed in the posting guidelines: http://www.codesynthesis.com/support/posting-guidelines.xhtml Amr Ali writes: > After I thought about it I came to appreciate how you made the templates so you > won't have to change the build system every time you make a change to the source > code. Right, plus, we don't have to change things in multiple places (autotools, project files for a couple of VC++ versions, etc). All this is auto-generated from a single source. > However, think about it this way, since the ORM repos are now submodules > for my project repository, people would clone the main repository and expect to > run bootstrap/configure/make and have all the submodules and the main project > ready to be used (Of course there will be binary packages, but that is aside > from the point) so I want that to be as easy as it can be. > > My suggestion is (if possible) to have your repository bundled with the fully > working bootstrapped buildtools system. Hm, that is something that we would like to avoid. Generation of the "secondary" build systems from the "primary" one is not something that we do during normal development and it takes some time. Also storing auto-generated things in the repository is generally a bad idea. Not sure what can be done here. Do you have to have ODB as submodules of your project? Can't they be external dependencies like, say, GCC? Boris From jsprenkle at gmail.com Tue Nov 9 17:41:37 2010 From: jsprenkle at gmail.com (Jay Sprenkle) Date: Tue Nov 9 17:41:40 2010 Subject: [odb-users] noob question about using odb with an IDE Message-ID: Good afternoon all, I use the netbeans IDE to do my development. It has options to specify the compiler but no option for additional steps during compilation. if I wanted to integrate odb with the IDE I would need to find some way for the odb compiler to start the gcc compiler when it finishes processing the source. I looked but didn't see an option for the odb compiler to call another executable. Any suggestions? Thanks, Jay From boris at codesynthesis.com Wed Nov 10 11:04:47 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 10 10:57:14 2010 Subject: [odb-users] noob question about using odb with an IDE In-Reply-To: References: Message-ID: Hi Jay, Jay Sprenkle writes: > I use the netbeans IDE to do my development. It has options to specify the > compiler but no option for additional steps during compilation. I believe custom build steps are supported, at least in the more recent versions. I have written a small guide on how to use ODB with Netbeans: http://wiki.codesynthesis.com/Using_ODB_with_Netbeans Can you give it a try and let me know if you run into any problems? Boris From jsprenkle at gmail.com Wed Nov 10 11:08:43 2010 From: jsprenkle at gmail.com (Jay Sprenkle) Date: Wed Nov 10 11:08:49 2010 Subject: [odb-users] noob question about using odb with an IDE In-Reply-To: References: Message-ID: Good morning, Thanks for the link :) In the directions it says: "4. In Project explorer right-click on the person.hxx file and select the "Properties" menu item. Select the "Custom Build Step" tab". In version 6.9.1 of Netbeans the custom build step seems to have been removed. If you select the compiler tab of the project properties there is an option called "tool". The help file says this is "The command to run the compiler". The compiler is already specified indirectly via the "Tool Collection" in the "Build" tab so I 'm not sure why this is present. It might be used for this though. I'll have to play with it and see how it works. On Wed, Nov 10, 2010 at 10:04 AM, Boris Kolpackov wrote: > Hi Jay, > > Jay Sprenkle writes: > > > I use the netbeans IDE to do my development. It has options to specify > the > > compiler but no option for additional steps during compilation. > > I believe custom build steps are supported, at least in the more recent > versions. I have written a small guide on how to use ODB with Netbeans: > > http://wiki.codesynthesis.com/Using_ODB_with_Netbeans > > Can you give it a try and let me know if you run into any problems? > > From boris at codesynthesis.com Wed Nov 10 15:40:29 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 10 15:32:55 2010 Subject: [odb-users] noob question about using odb with an IDE In-Reply-To: References: Message-ID: Hi Jay, Jay Sprenkle writes: > In version 6.9.1 of Netbeans the custom build step seems to have been > removed. I tested the instructions with this version. > If you select the compiler tab of the project properties there is an > option called "tool". The help file says this is "The command to run > the compiler". The compiler is already specified indirectly via the > "Tool Collection" in the "Build" tab so I 'm not sure why this is > present. You don't select project's properties. You select the header file's (which you want to compile with the ODB compiler) properties. There in the "General" tab and in its "Tool" field I see Custom Build Tool. There is also the "Custom Build Step" tab where I can enter all the information mentioned in the guide. What is the extension of the file that you want to compile with ODB? Perhaps Netbeans thinks that it is a C++ source file instead of a header file, for some reason? Boris From mksong at vt.edu Wed Nov 17 21:11:15 2010 From: mksong at vt.edu (Myoungkyu Song) Date: Thu Nov 18 15:33:11 2010 Subject: [odb-users] compile libodb-mysql-1.0.0 runtime library Message-ID: <005301cb86c5$e1660530$a4320f90$@vt.edu> Hello, My name is Myoungkyu Song, and I am a graduate student at Dept. of Computer Science at Virginia Tech. I wanted to use ODB - C++ persistence library, so I am trying to compile libodb-mysql runtime library. To do that, I compiled MySQL to get the MySQL libraries. However, when I compiled libodb-mysql-1.0.0, I've got this following message. *** Warning: This system can not link to static lib archive /usr/local/mysql/lib/mysql/libmysqlclient_r.la. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. Would you be able to help me out? @My system: Window XP, Cygwin, g++ (GCC) 4.3.4, libtool (GNU libtool) 2.4, cmake version 2.8.2 Best regards, Myoungkyu Song Myoungkyu Song, PhD Student Software Innovations Lab, Dept. of Computer Science, Virginia Tech 2202 Kraft Drive Blacksburg, VA 24060 mksong@cs.vt.edu http://people.cs.vt.edu/~mksong/ From mksong at vt.edu Thu Nov 18 14:26:21 2010 From: mksong at vt.edu (Myoungkyu Song) Date: Thu Nov 18 15:33:43 2010 Subject: [odb-users] undefined reference to `person::person' Message-ID: <00ac01cb8756$7b0f0430$712d0c90$@vt.edu> Hello, ODB developers & users gcc -c driver.cxx person-odb.cxx \ -I/home/grads/mksong/odb/libodb/include \ -I/home/grads/mksong/odb/libodb-mysql-1.0.0 \ -I/home/grads/mksong/mysql/include/mysql Fortunately, I have gotten 'driver.o' and 'person-odb.o'. And then, I typed the following command; gcc -o driver driver.o person-odb.o -lodb -lodb-mysql \ -L/home/grads/mksong/odb/libodb/lib \ -L/home/grads/mksong/odb/libodb-mysql-1.0.0/odb/mysql/.libs However, I have gotten the errors like; [mksong@ap2 bin]$ gcc -o driver driver.o person-odb.o -lodb -lodb-mysql -L/home/grads/mksong/odb/libodb/lib -L/home/grads/mksong/odb/libodb-mysql-1.0.0/odb/mysql/.libs driver.o: In function `main': driver.cxx:(.text+0x25d): undefined reference to `person::person(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, unsigned short)' driver.cxx:(.text+0x3b3): undefined reference to `person::person(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, unsigned short)' driver.cxx:(.text+0x50c): undefined reference to `person::person(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, unsigned short)' driver.cxx:(.text+0x69e): undefined reference to `person::id()' driver.cxx:(.text+0x6ac): undefined reference to `person::id()' driver.cxx:(.text+0x6bd): undefined reference to `person::id()' collect2: ld returned 1 exit status [mksong@ap2 bin]$ [mksong@ap2 bin]$ Attached are my codes I compiled. Would you able to help me out? Best regards, Myoungkyu Song ------- Myoungkyu Song, PhD Student Software Innovations Lab, Dept. of Computer Science, Virginia Tech 2202 Kraft Drive Blacksburg, VA 24060 mksong@cs.vt.edu http://people.cs.vt.edu/~mksong/ -------------- next part -------------- // This file was generated by ODB, object-relational mapping (ORM) // compiler for C++. // // Begin prologue. // // // End prologue. #include #include "person-odb.hxx" #include #include #include #include #include #include #include #include #include namespace odb { // person // const mysql::query_column< mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::query_type, mysql::id_ulonglong> access::object_traits< ::person >::query_type::id ( "`person`.`id`"); const mysql::query_column< mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::query_type, mysql::id_string> access::object_traits< ::person >::query_type::first ( "`person`.`first`"); const mysql::query_column< mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::query_type, mysql::id_string> access::object_traits< ::person >::query_type::last ( "`person`.`last`"); const mysql::query_column< mysql::value_traits< short unsigned int, unsigned short, mysql::id_ushort >::query_type, mysql::id_ushort> access::object_traits< ::person >::query_type::age ( "`person`.`age`"); const char* const access::object_traits< ::person >::persist_statement = "INSERT INTO `person` (" "`id`," "`first`," "`last`," "`age`" ") VALUES (?,?,?,?)"; const char* const access::object_traits< ::person >::find_statement = "SELECT " "`id`," "`first`," "`last`," "`age`" " FROM `person` WHERE `id` = ?"; const char* const access::object_traits< ::person >::update_statement = "UPDATE `person` SET " "`id` = ?," "`first` = ?," "`last` = ?," "`age` = ?" " WHERE `id` = ?"; const char* const access::object_traits< ::person >::erase_statement = "DELETE FROM `person`" " WHERE `id` = ?"; const char* const access::object_traits< ::person >::query_clause = "SELECT " "`id`," "`first`," "`last`," "`age`" " FROM `person` "; bool access::object_traits< ::person >:: grow (image_type& i, my_bool* e) { bool r (false); // id_ // e[0UL] = 0; // first_ // if (e[1UL]) { i.first_value.capacity (i.first_size); r = true; } // last_ // if (e[2UL]) { i.last_value.capacity (i.last_size); r = true; } // age_ // e[3UL] = 0; return r; } void access::object_traits< ::person >:: bind (mysql::binding& b, image_type& i) { // id_ // b.bind[0UL].buffer_type = MYSQL_TYPE_LONGLONG; b.bind[0UL].is_unsigned = 1; b.bind[0UL].buffer = &i.id_value; b.bind[0UL].is_null = &i.id_null; // first_ // b.bind[1UL].buffer_type = MYSQL_TYPE_STRING; b.bind[1UL].buffer = i.first_value.data (); b.bind[1UL].buffer_length = static_cast ( i.first_value.capacity ()); b.bind[1UL].length = &i.first_size; b.bind[1UL].is_null = &i.first_null; // last_ // b.bind[2UL].buffer_type = MYSQL_TYPE_STRING; b.bind[2UL].buffer = i.last_value.data (); b.bind[2UL].buffer_length = static_cast ( i.last_value.capacity ()); b.bind[2UL].length = &i.last_size; b.bind[2UL].is_null = &i.last_null; // age_ // b.bind[3UL].buffer_type = MYSQL_TYPE_SHORT; b.bind[3UL].is_unsigned = 1; b.bind[3UL].buffer = &i.age_value; b.bind[3UL].is_null = &i.age_null; b.version++; } void access::object_traits< ::person >:: bind (mysql::binding& b, id_image_type& i) { b.bind[0UL].buffer_type = MYSQL_TYPE_LONGLONG; b.bind[0UL].is_unsigned = 1; b.bind[0UL].buffer = &i.id_value; b.bind[0UL].is_null = &i.id_null; b.version++; } bool access::object_traits< ::person >:: init (image_type& i, const object_type& o) { bool grew (false); bool is_null; // id_ // mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::set_image ( i.id_value, is_null, o.id_); i.id_null = is_null; // first_ // { std::size_t size; std::size_t cap (i.first_value.capacity ()); mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::set_image ( i.first_value, size, is_null, o.first_); i.first_size = static_cast (size); i.first_null = is_null; grew = grew || (cap != i.first_value.capacity ()); } // last_ // { std::size_t size; std::size_t cap (i.last_value.capacity ()); mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::set_image ( i.last_value, size, is_null, o.last_); i.last_size = static_cast (size); i.last_null = is_null; grew = grew || (cap != i.last_value.capacity ()); } // age_ // mysql::value_traits< short unsigned int, unsigned short, mysql::id_ushort >::set_image ( i.age_value, is_null, o.age_); i.age_null = is_null; return grew; } void access::object_traits< ::person >:: init (object_type& o, const image_type& i) { // id_ // mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::set_value ( o.id_, i.id_value, i.id_null); // first_ // mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::set_value ( o.first_, i.first_value, i.first_size, i.first_null); // last_ // mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::set_value ( o.last_, i.last_value, i.last_size, i.last_null); // age_ // mysql::value_traits< short unsigned int, unsigned short, mysql::id_ushort >::set_value ( o.age_, i.age_value, i.age_null); } void access::object_traits< ::person >:: persist (database&, object_type& obj) { using namespace mysql; connection& conn (mysql::transaction::current ().connection ()); object_statements& sts ( conn.statement_cache ().find ()); binding& b (sts.image_binding ()); obj.id_ = 0; if (init (sts.image (), obj) || b.version == 0) bind (b, sts.image ()); mysql::persist_statement& st (sts.persist_statement ()); st.execute (); obj.id_ = static_cast (st.id ()); } void access::object_traits< ::person >:: update (database&, const object_type& obj) { using namespace mysql; connection& conn (mysql::transaction::current ().connection ()); object_statements& sts ( conn.statement_cache ().find ()); bool is_null, grew (false); const id_type& id (object_traits::id (obj)); id_image_type& i (sts.id_image ()); mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::set_image ( i.id_value, is_null, id); i.id_null = is_null; binding& idb (sts.id_image_binding ()); if (grew || idb.version == 0) bind (idb, i); binding& imb (sts.image_binding ()); if (init (sts.image (), obj) || imb.version == 0) bind (imb, sts.image ()); sts.update_statement ().execute (); } void access::object_traits< ::person >:: erase (database&, const id_type& id) { using namespace mysql; connection& conn (mysql::transaction::current ().connection ()); object_statements& sts ( conn.statement_cache ().find ()); bool is_null, grew (false); id_image_type& i (sts.id_image ()); mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::set_image ( i.id_value, is_null, id); i.id_null = is_null; binding& idb (sts.id_image_binding ()); if (grew || idb.version == 0) bind (idb, i); sts.erase_statement ().execute (); } access::object_traits< ::person >::pointer_type access::object_traits< ::person >:: find (database&, const id_type& id) { using namespace mysql; connection& conn (mysql::transaction::current ().connection ()); object_statements& sts ( conn.statement_cache ().find ()); if (find (sts, id)) { pointer_type p (access::object_factory< ::person >::create ()); pointer_traits< pointer_type >::guard g (p); init (pointer_traits< pointer_type >::get_ref (p), sts.image ()); g.release (); return p; } return pointer_type (); } bool access::object_traits< ::person >:: find (database&, const id_type& id, object_type& obj) { using namespace mysql; connection& conn (mysql::transaction::current ().connection ()); object_statements& sts ( conn.statement_cache ().find ()); if (find (sts, id)) { init (obj, sts.image ()); return true; } return false; } bool access::object_traits< ::person >:: find (mysql::object_statements& sts, const id_type& id) { using namespace mysql; bool is_null, grew (false); id_image_type& i (sts.id_image ()); mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::set_image ( i.id_value, is_null, id); i.id_null = is_null; binding& idb (sts.id_image_binding ()); if (grew || idb.version == 0) bind (idb, i); binding& imb (sts.image_binding ()); if (imb.version == 0) bind (imb, sts.image ()); mysql::find_statement& st (sts.find_statement ()); mysql::find_statement::result r (st.execute ()); if (r == mysql::find_statement::no_data) return false; if (r == mysql::find_statement::truncated) { if (grow (sts.image (), sts.image_error ())) { bind (imb, sts.image ()); st.refetch (); } } st.free_result (); return true; } result< access::object_traits< ::person >::object_type > access::object_traits< ::person >:: query (database&, const query_type& q) { using namespace mysql; connection& conn (mysql::transaction::current ().connection ()); object_statements& sts ( conn.statement_cache ().find ()); binding& imb (sts.image_binding ()); if (imb.version == 0) bind (imb, sts.image ()); details::shared_ptr st ( new (details::shared) query_statement (conn, query_clause + q.clause (), imb, q.parameters ())); st->execute (); details::shared_ptr > r ( new (details::shared) mysql::result_impl (st, sts)); return result (r); } } #include // Begin epilogue. // // // End epilogue. -------------- next part -------------- // This file was generated by ODB, object-relational mapping (ORM) // compiler for C++. // #ifndef PERSON_ODB_HXX #define PERSON_ODB_HXX // Begin prologue. // // // End prologue. #include #if (ODB_VERSION != 10000UL) #error ODB runtime version mismatch #endif #include #include "person.hxx" #include #include #include #include #include #include #include #include #include namespace odb { // person // template <> class access::object_traits< ::person >: public access::object_memory< ::person >, public access::object_factory< ::person > { public: typedef ::person object_type; typedef long unsigned int id_type; struct image_type { // id_ // unsigned long long id_value; my_bool id_null; // first_ // details::buffer first_value; unsigned long first_size; my_bool first_null; // last_ // details::buffer last_value; unsigned long last_size; my_bool last_null; // age_ // unsigned short age_value; my_bool age_null; }; struct id_image_type { unsigned long long id_value; my_bool id_null; }; typedef mysql::query query_base_type; struct query_type: query_base_type { // id // static const mysql::query_column< mysql::value_traits< long unsigned int, unsigned long long, mysql::id_ulonglong >::query_type, mysql::id_ulonglong> id; // first // static const mysql::query_column< mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::query_type, mysql::id_string> first; // last // static const mysql::query_column< mysql::value_traits< ::std::string, details::buffer, mysql::id_string >::query_type, mysql::id_string> last; // age // static const mysql::query_column< mysql::value_traits< short unsigned int, unsigned short, mysql::id_ushort >::query_type, mysql::id_ushort> age; query_type (); query_type (const std::string&); query_type (const query_base_type&); }; static const std::size_t column_count = 4UL; static const char* const persist_statement; static const char* const find_statement; static const char* const update_statement; static const char* const erase_statement; static const char* const query_clause; static id_type id (const object_type&); static bool grow (image_type&, my_bool*); static void bind (mysql::binding&, image_type&); static void bind (mysql::binding&, id_image_type&); static bool init (image_type&, const object_type&); static void init (object_type&, const image_type&); static void persist (database&, object_type&); static void update (database&, const object_type&); static void erase (database&, const id_type&); static pointer_type find (database&, const id_type&); static bool find (database&, const id_type&, object_type&); static result query (database&, const query_type&); private: static bool find (mysql::object_statements&, const id_type&); }; } #include "person-odb.ixx" #include // Begin epilogue. // // // End epilogue. #endif // PERSON_ODB_HXX -------------- next part -------------- A non-text attachment was scrubbed... Name: person-odb.ixx Type: application/octet-stream Size: 712 bytes Desc: not available Url : http://codesynthesis.com/pipermail/odb-users/attachments/20101118/a622728f/person-odb.obj -------------- next part -------------- // driver.cxx // #include // std::auto_ptr #include #include #include #include #include "person.hxx" #include "person-odb.hxx" using namespace std; using namespace odb; int main (int argc, char* argv[]) { try { auto_ptr db (new mysql::database (argc, argv)); unsigned long john_id, jane_id, joe_id; // Create a few persistent person objects. // { person john ("John", "Doe", 33); person jane ("Jane", "Doe", 32); person joe ("Joe", "Dirt", 30); transaction t (db->begin ()); db->persist (john); db->persist (jane); db->persist (joe); t.commit (); // Save object ids for later use. // john_id = john.id (); jane_id = jane.id (); joe_id = joe.id (); } } catch (const odb::exception& e) { cerr << e.what () << endl; return 1; } } -------------- next part -------------- #ifndef PERSON_HXX #define PERSON_HXX // person.hxx // #include #include // (1) #pragma db object // (2) class person { public: person (const std::string& first, const std::string& last, unsigned short age); unsigned long id() const; const std::string& first () const; const std::string& last () const; unsigned short age () const; void age (unsigned short); private: person () {} // (3) friend class odb::access; // (4) #pragma db id auto // (5) unsigned long id_; // (5) std::string first_; std::string last_; unsigned short age_; }; #endif -------------- next part -------------- /* This file was generated by ODB, object-relational mapping (ORM) * compiler for C++. */ DROP TABLE IF EXISTS `person`; CREATE TABLE `person` ( `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `first` TEXT NOT NULL, `last` TEXT NOT NULL, `age` SMALLINT UNSIGNED NOT NULL) ENGINE=InnoDB; From boris at codesynthesis.com Thu Nov 18 15:48:25 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Nov 18 15:41:04 2010 Subject: [odb-users] compile libodb-mysql-1.0.0 runtime library In-Reply-To: <005301cb86c5$e1660530$a4320f90$@vt.edu> References: <005301cb86c5$e1660530$a4320f90$@vt.edu> Message-ID: Hi Myoungkyu, Myoungkyu Song writes: > To do that, I compiled MySQL to get the MySQL libraries. However, > when I compiled libodb-mysql-1.0.0, > > *** Warning: This system can not link to static lib archive > /usr/local/mysql/lib/mysql/libmysqlclient_r.la. It looks like you built libmysqlclient as a static library and is trying to build libodb-mysql as a shared library. This won't work. You will either need to build libmysqlclient as a shared library or build libodb-mysql (and libodb) as static. Pass --disable-shared to configure to achieve the latter. Boris From boris at codesynthesis.com Thu Nov 18 15:54:29 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Nov 18 15:47:06 2010 Subject: [odb-users] undefined reference to `person::person' In-Reply-To: <00ac01cb8756$7b0f0430$712d0c90$@vt.edu> References: <00ac01cb8756$7b0f0430$712d0c90$@vt.edu> Message-ID: Hi Myoungkyu, Myoungkyu Song writes: > driver.cxx:(.text+0x25d): undefined reference to > `person::person(std::basic_string, > std::allocator > const&, std::basic_string std::char_traits, std::allocator > const&, unsigned short)' You person.hxx declares this constructor but it is not implemented anywhere in your code. Try to add person.cxx and implement this constructor there. The same goes for other undefined symbols. Also, in the future, please do not attached the generated code to your email since it can easily be obtained by compiling the header. For other tips on posting to this mailing list, please see the Posting Guidelines page: http://www.codesynthesis.com/support/posting-guidelines.xhtml Boris From mksong at vt.edu Fri Nov 19 15:08:54 2010 From: mksong at vt.edu (Myoungkyu Song) Date: Fri Nov 19 15:09:18 2010 Subject: [odb-users] Compile libodb-mysql-1.0.0 runtime library Message-ID: <002501cb8825$9758ae50$c60a0af0$@vt.edu> Hello, =20 In order to compile =A1=AElibodb-mysql-1.0.0=A1=AF runtime library with = Cygwin,=20 As a prerequisite library, I downloaded the MySQL connector source=20 from http://www.mysql.com/downloads/connector/c/. I selected the =A1=AESource Code=A1=AF at the combo box. =A1=A1 =A1=A1$ tar xzf mysql-connector-c-6.0.2.tar.gz.gz =A1=A1$ cd mysql-connector-c-6.0.2 =A1=A1$ cmake -G "Unix Makefiles" = -DCMAKE_INSTALL_PREFIX=3D/home/smk/mysql- connector =A1=A1 CMake Error at /usr/share/cmake-2.8.2/Modules/TestBigEndian.cmake:44 (MESSAGE): no suitable type found Call Stack (most recent call first): CMakePlatformTests.txt:200 (TEST_BIG_ENDIAN) CMakeLists.txt:267 (INCLUDE) =20 =20 -- Configuring incomplete, errors occurred! =20 My system has Cygwin and cmake 2.8.2. Would you able to help me out? =20 Best regards, Myoungkyu Song =20 ---------- Myoungkyu Song, PhD Student Software Innovations Lab,=20 Dept. of Computer Science,=20 Virginia Tech 2202 Kraft Drive Blacksburg, VA 24060=20 mksong@cs.vt.edu http://people.cs.vt.edu/~mksong/ =20 =20 From mksong at vt.edu Fri Nov 19 20:53:05 2010 From: mksong at vt.edu (Myoungkyu Song) Date: Fri Nov 19 20:53:30 2010 Subject: [odb-users] odb-1.0.0 install Message-ID: <005901cb8855$ac6e7970$054b6c50$@vt.edu> Hello, I am trying to install odb-1.0.0 with Cygwin on Window XP. When I commit "./configure", I got the following error; checking how to hardcode library paths into programs... immediate checking whether g++ supports plugins... no configure: error: g++ does not support plugins; reconfigure GCC with --enable-plugin Could you help me out? Sincerely, Myoungkyu Song ------ Myoungkyu Song, PhD Student Software Innovations Lab, Dept. of Computer Science, Virginia Tech 2202 Kraft Drive Blacksburg, VA 24060 mksong@cs.vt.edu http://people.cs.vt.edu/~mksong/ 540-808-5379 (phone) From mksong at vt.edu Fri Nov 19 21:46:36 2010 From: mksong at vt.edu (Myoungkyu Song) Date: Fri Nov 19 21:47:00 2010 Subject: [odb-users] compile error with Cygwin about hello world example Message-ID: <000001cb885d$26373740$72a5a5c0$@vt.edu> Hello, I have tested the following Hello world example which is working well on Linux system, however I can't compile the example with Cygwin. The following list is my system's test environment. /home/smk/odb/odbtest/: rwxrwxrwx smk:None 500 Nov 19 21:24 Makefile rwxrwxrwx smk:None 1K Nov 19 00:11 driver.cxx rw-r--r-- smk:None 13K Nov 19 21:21 driver.o rw-r--r-- smk:None 17K Nov 19 21:32 error.txt rwxrwxrwx smk:None 11K Nov 19 21:27 person-odb.cxx rwxrwxrwx smk:None 3.7K Nov 19 21:13 person-odb.hxx rwxrwxrwx smk:None 759 Nov 19 21:13 person-odb.ixx rw-r--r-- smk:None 95K Nov 19 21:27 person-odb.o rwxrwxrwx smk:None 640 Nov 18 16:35 person.hxx rwxrwxrwx smk:None 325 Nov 19 21:13 person.sql /home/smk/odb/libodb-mysql/lib/: rwxr-xr-x smk:None 0 Nov 19 20:04 pkgconfig/ rw-r--r-- smk:None 1.2M Nov 19 20:04 libodb-mysql.a rwxr-xr-x smk:None 1K Nov 19 20:04 libodb-mysql.la /home/smk/odb/libodb/lib/: rwxr-xr-x smk:None 0 Nov 19 13:12 pkgconfig/ rwxr-xr-x smk:None 55K Nov 19 13:12 libodb.dll.a rwxr-xr-x smk:None 953 Nov 19 13:12 libodb.la Best regards, Myoungkyu Song -------------- next part -------------- A non-text attachment was scrubbed... Name: odbtest.zip Type: application/x-zip-compressed Size: 6522 bytes Desc: not available Url : http://codesynthesis.com/pipermail/odb-users/attachments/20101119/196ef66f/odbtest.bin From boris at codesynthesis.com Mon Nov 22 08:59:29 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 22 08:52:12 2010 Subject: [odb-users] compile error with Cygwin about hello world example In-Reply-To: <000001cb885d$26373740$72a5a5c0$@vt.edu> References: <000001cb885d$26373740$72a5a5c0$@vt.edu> Message-ID: Hi Myoungkyu, Myoungkyu Song writes: > I can't compile the example with Cygwin. > > /home/smk/odb/libodb-mysql/lib/: > rwxr-xr-x smk:None 0 Nov 19 20:04 pkgconfig/ > rw-r--r-- smk:None 1.2M Nov 19 20:04 libodb-mysql.a > rwxr-xr-x smk:None 1K Nov 19 20:04 libodb-mysql.la > > /home/smk/odb/libodb/lib/: > rwxr-xr-x smk:None 0 Nov 19 13:12 pkgconfig/ > rwxr-xr-x smk:None 55K Nov 19 13:12 libodb.dll.a > rwxr-xr-x smk:None 953 Nov 19 13:12 libodb.la You have libodb built as a DLL while libodb-mysql and, I assume, libmysqclient_r as static libraries. First, rebuild libodb as a static library (pass --disable-shared to configure). > g++ driver.o person-odb.o -o driver \ > -L. \ > -L/home/smk/odb/libodb/lib \ > -L/home/smk/odb/libodb-mysql/lib \ > -lodb -lodb-mysql Once this is done, change the last line in the above link command to read: -lodb-mysql -lodb -lmysqlclient_r When linking static libraries, the order is important. Boris From boris at codesynthesis.com Mon Nov 22 09:25:09 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 22 09:17:52 2010 Subject: [odb-users] odb-1.0.0 install In-Reply-To: <005901cb8855$ac6e7970$054b6c50$@vt.edu> References: <005901cb8855$ac6e7970$054b6c50$@vt.edu> Message-ID: Hi Myoungkyu, Myoungkyu Song writes: > I am trying to install odb-1.0.0 with Cygwin on Window XP. Use the pre-compiled binary distribution for the ODB compiler on Windows (odb-1.0.0-i686-windows): http://www.codesynthesis.com/products/odb/download.xhtml Boris From boris at codesynthesis.com Mon Nov 22 09:30:51 2010 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 22 09:23:35 2010 Subject: [odb-users] Compile libodb-mysql-1.0.0 runtime library In-Reply-To: <002501cb8825$9758ae50$c60a0af0$@vt.edu> References: <002501cb8825$9758ae50$c60a0af0$@vt.edu> Message-ID: Hi Myoungkyu, Myoungkyu Song writes: > In order to compile libodb-mysql-1.0.0 runtime library with Cygwin, > > As a prerequisite library, I downloaded the MySQL connector source > > from http://www.mysql.com/downloads/connector/c/. You don't need MySQL C Connector for ODB. All you need is a the MySQL client library. Check the Cygwin repository, it should have it already built. If, however, you are still having trouble building some components of MySQL on Cygwin, please ask for help on either MySQL or Cygwin forums/mailing lists since folks there will probably have more knowledge about such issues. Boris