dbTalk Databases Forums  

[patch] SSQLS linking problem

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss [patch] SSQLS linking problem in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Viktor Stark
 
Posts: n/a

Default [patch] SSQLS linking problem - 12-21-2005 , 03:15 AM






--========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"

LS0tIGN1c3RvbS5wbC5vcmlnCTIwMDUtMTItMjAgMTQ6MzE6ND EuMDAwMDAwMDAwICswMTAwCisr
KyBjdXN0b20ucGwJMjAwNS0xMi0yMSAwOTo1NjoxOS4wMDAwMD AwMDAgKzAxMDAKQEAgLTU2LDYg
KzU2LDEyIEBACiAKICNpbmNsdWRlIDxzdHJpbmc+CiAKKyNpZm RlZiBNWVNRTFBQX1NTUUxTX05P
X1NUQVRJQ1MKKyNkZWZpbmUgTVlTUUxQUF9TU1FMU19FWFBBTk QoYS4uLikKKyNlbHNlCisjZGVm
aW5lIE1ZU1FMUFBfU1NRTFNfRVhQQU5EKGEuLi4pIGEKKyNlbm RpZgorCiBuYW1lc3BhY2UgbXlz
cWxwcCB7CiAKIGVudW0gc3FsX2R1bW15X3R5cGUge3NxbF9kdW 1teX07CkBAIC02MzUsMTEgKzY0
MSwxMSBAQAogICAgIE5BTUUjI19jdXNfZXF1YWxfbGlzdDxNYW 5pcD4gZXF1YWxfbGlzdChteXNx
bHBwOjpjY2hhciAqZCwgbXlzcWxwcDo6Y2NoYXIgKmMsIE1hbm lwIG0sIAogCQkJCQkgICAgbXlz
cWxwcDo6c3FsX2NtcF90eXBlIHNjKSBjb25zdDsKICAgfTsgCi 0KKyAgTVlTUUxQUF9TU1FMU19F
WFBBTkQoCiAgIGNvbnN0IGNoYXIgKk5BTUU6Om5hbWVzW10gPS B7IAogJG5hbWVzIAogICB9OyAK
LSAgY29uc3QgY2hhciAqTkFNRTo6X3RhYmxlID0gI05BTUUgOy AgCisgIGNvbnN0IGNoYXIgKk5B
TUU6Ol90YWJsZSA9ICNOQU1FIDspCiAKICAgdGVtcGxhdGUgPG NsYXNzIE1hbmlwPgogICBOQU1F
IyNfY3VzX3ZhbHVlX2xpc3Q8TWFuaXA+OjpOQU1FIyNfY3VzX3 ZhbHVlX2xpc3QK


--========GMXBoundary318891135156502
Content-Type: text/plain; charset=us-ascii


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw
--========GMXBoundary318891135156502--


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: [patch] SSQLS linking problem - 12-21-2005 , 04:15 PM






Viktor Stark wrote:
Quote:
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.
Thanks for the patch! I'm going to hold this off for v2.1, as it's a
new feature, not a bug fix. It's easy for someone to patch their own
copy until then.

Thanks, especially, for using good macro names, so I can accept the
patch without changes.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: [patch] SSQLS linking problem - 03-04-2006 , 02:53 AM



Viktor Stark wrote:
Quote:
- 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).
Thanks again for the patch. I've applied it to the repository. It will
appear in 2.1.0.alpha3.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.