From: Date: December 21 2005 10:15am Subject: [patch] SSQLS linking problem List-Archive: http://lists.mysql.com/plusplus/5314 Message-Id: <31889.1135156502@www32.gmx.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="========GMXBoundary318891135156502" --========GMXBoundary318891135156502 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, The issue has been raised a few times already on the list, IIRC. Just a little reminder: - Create dbHandling.h (class definition) and dbHandling.cpp (member function implementations). - If you are using sql_create_# macros, and you include dbHandling.h in another file, you'll get linking conflicts (namely on ::_table and ::names). To solve that issue, custom.pl needs a small modification so that it generates a custom-macros.h which only defines ::_table and ::names once. There is a small quick-n-dirty patch attached. Apply with: patch -p0 < ssqls-link.patch Then run: custom.pl You'll now have a new custom-macros.h. If you dont want the static members to be defined in a file, then just: #define MYSQLPP_SSQLS_NO_STATICS Don't forget that you need the static members to be defined at some point (but only *once*). Just a note: this has been tested only under Debian unstable/FC4. I have no access to Windows development machines. Any feedback on different architectures is welcome. Hope some people will find this useful. Viktor -- 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail +++ GMX - die erste Adresse für Mail, Message, More +++ --========GMXBoundary318891135156502 Content-Type: text/plain; name="ssqls-link.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ssqls-link.patch" LS0tIGN1c3RvbS5wbC5vcmlnCTIwMDUtMTItMjAgMTQ6MzE6NDEuMDAwMDAwMDAwICswMTAwCisr KyBjdXN0b20ucGwJMjAwNS0xMi0yMSAwOTo1NjoxOS4wMDAwMDAwMDAgKzAxMDAKQEAgLTU2LDYg KzU2LDEyIEBACiAKICNpbmNsdWRlIDxzdHJpbmc+CiAKKyNpZmRlZiBNWVNRTFBQX1NTUUxTX05P X1NUQVRJQ1MKKyNkZWZpbmUgTVlTUUxQUF9TU1FMU19FWFBBTkQoYS4uLikKKyNlbHNlCisjZGVm aW5lIE1ZU1FMUFBfU1NRTFNfRVhQQU5EKGEuLi4pIGEKKyNlbmRpZgorCiBuYW1lc3BhY2UgbXlz cWxwcCB7CiAKIGVudW0gc3FsX2R1bW15X3R5cGUge3NxbF9kdW1teX07CkBAIC02MzUsMTEgKzY0 MSwxMSBAQAogICAgIE5BTUUjI19jdXNfZXF1YWxfbGlzdDxNYW5pcD4gZXF1YWxfbGlzdChteXNx bHBwOjpjY2hhciAqZCwgbXlzcWxwcDo6Y2NoYXIgKmMsIE1hbmlwIG0sIAogCQkJCQkgICAgbXlz cWxwcDo6c3FsX2NtcF90eXBlIHNjKSBjb25zdDsKICAgfTsgCi0KKyAgTVlTUUxQUF9TU1FMU19F WFBBTkQoCiAgIGNvbnN0IGNoYXIgKk5BTUU6Om5hbWVzW10gPSB7IAogJG5hbWVzIAogICB9OyAK LSAgY29uc3QgY2hhciAqTkFNRTo6X3RhYmxlID0gI05BTUUgOyAgCisgIGNvbnN0IGNoYXIgKk5B TUU6Ol90YWJsZSA9ICNOQU1FIDspCiAKICAgdGVtcGxhdGUgPGNsYXNzIE1hbmlwPgogICBOQU1F IyNfY3VzX3ZhbHVlX2xpc3Q8TWFuaXA+OjpOQU1FIyNfY3VzX3ZhbHVlX2xpc3QK --========GMXBoundary318891135156502--