Warren Young wrote:
> A search for those errors on the list would have turned up the answer.
> We've certainly talked about it enough times.
>
Sorry for being boring :)
Using MYSQLPP_SSQLS_NO_STATICS worked at first, since I was using it in
the manner described in your example, including only from source files:
// File my_ssqls.h:
sql_create_2(myType, 0, 1, unsigned int, id, unsigned int, key) // the
SSQLS definition
// File foo.cpp, which just uses the SSQLS, but doesn't "own" it:
#define MYSQLPP_SSQLS_NO_STATICS
#include "my_ssqls.h"
#include <vector>
void foo::DoSomething()
{
std::vector<myType> r;
}
// File my_ssqls.cpp, which owns the SSQLS, so we just #include it directly
#include "my_ssqls.h"
My problem new problem came when I needed to include my_ssqls.h in a
header file to use the defined type there:
// File foo.h
#define MYSQLPP_SSQLS_NO_STATICS
#include "my_ssqls.h"
#include <vector>
class foo
{
public:
void DoSomething();
void DoSomething( std::vector<myType> result );
};
This situation gets an UNKNOWN TYPE for myType in foo.h. I have
experimented with millions of permutations of where to put the includes
and MYSQLPP_SSQLS_NO_STATICS.
Ring any bells with anyone?
Thanks
Simon
| 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 |