List:MySQL++« Previous MessageNext Message »
From:Simon Pickles Date:December 16 2007 10:22pm
Subject:Re: Linking errors after moving to SSQLSs, macro problem
View as plain text  
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 problemSimon Pickles12 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemWilliam F. Dowling12 Dec
Re: Linking errors after moving to SSQLSs, macro problemWarren Young12 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemSimon Pickles16 Dec
Re: Linking errors after moving to SSQLSs, macro problemWarren Young17 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemSimon Pickles17 Dec
Re: Linking errors after moving to SSQLSs, macro problemWarren Young17 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemSimon Pickles17 Dec
RE: Linking errors after moving to SSQLSs, macro problemJoel Fielder17 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemDrew M.18 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemSimon Pickles18 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemWarren Young18 Dec
    • Re: Linking errors after moving to SSQLSs, macro problemJim19 Dec
      • Re: Linking errors after moving to SSQLSs, macro problemWarren Young19 Dec
        • Re: Linking errors after moving to SSQLSs, macro problemJim20 Dec
          • Re: Linking errors after moving to SSQLSs, macro problemWarren Young21 Dec
Re: Linking errors after moving to SSQLSs, macro problemWarren Young18 Dec
  • Re: Linking errors after moving to SSQLSs, macro problemWarren Young18 Dec
    • Re: Linking errors after moving to SSQLSs, macro problemSimon Pickles18 Dec
Re: Linking errors after moving to SSQLSs, macro problemWarren Young18 Dec