Hi,
My app was building and running without using SSQLS, but seeing the
simplicity and extra functionality they afford, I moved to SSQLS.
Unfortunately, this generates a string of linker errors now, due to
multiple definitions.
This is, I think, because I have declared the SSQLS using a macro in a
header file. To use the resulting data structure I have been including
the header file, but this runs the macro repeatedly of course.
Eg:
#ifndef DATABASESTRUCTS_H
#define DATABASESTRUCTS_H
#include <mysql++.h>
#include <custom.h>
sql_create_4( PlayerSQL, 1, 0,
unsigned int, PLAYER_ID,
std::string, PLAYER_NAME,
unsigned int, PLAYER_OBJECTID,
unsigned int, PLAYER_ZONE );
#endif
What is the correct way to overcome this? I need PlayerManager.cpp and
Player.cpp to have PlayerSQL in scope.
Thanks
Simon
--
Linux user #458601 - http://counter.li.org.
Thread |
---|
• Linking errors after moving to SSQLSs, macro problem | Simon Pickles | 12 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | William F. Dowling | 12 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 12 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Simon Pickles | 16 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 17 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Simon Pickles | 17 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 17 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Simon Pickles | 17 Dec |
• RE: Linking errors after moving to SSQLSs, macro problem | Joel Fielder | 17 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Drew M. | 18 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Simon Pickles | 18 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 18 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Jim | 19 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 19 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Jim | 20 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 21 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 18 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 18 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Simon Pickles | 18 Dec |
• Re: Linking errors after moving to SSQLSs, macro problem | Warren Young | 18 Dec |