List:MySQL++« Previous MessageNext Message »
From:ahnkle Date:October 28 2005 7:09pm
Subject:Re: SSQLS contained within class definition compilation issues
View as plain text  
william.lieberman@stripped wrote:
> I've read some previous posts about compilation issues, but they don't 
> seem to pertain to my problem.  I have a class declaration in which some 
> private functions pass a vector of SSQLS type.  During compilation, my 
> compiler returns: "multiple definition of log::names"  and "multiple 
> definition of log::_table" errors.  Not sure if it matters, but I am 
> compiling on FreeBSD using g++ (3.4.2) and mysql++ 1.7.40.
> 
> Here are the relevant items from my class declaration:
> 
> Outside of my class type I use the sql_create to build the structure.
> 
> sql_create_12(log,
>                 1,12,
>                 int, serialnumber,
>                 .......
>                 .......)
> 
> Inside of my class declaration, I have the function:
> 
> print_log(vector<log> log_vector);
> 

I had the same problem, putting a create_sql_x macro in a class. In vc++
7.1, I used a forward declaration:

============================== my.h =
struct log;
typedef vector<log> LogContainer;

class MyClass
{
   public:
   void print_log(LogContainer);
};
============================== my.cpp =

create_sql_12(log,1,12 ...

MyClass::print_log(LogContainer)
{}

==============================


regards,
ahnkle
Thread
SSQLS contained within class definition compilation issueswilliam.lieberman25 Oct
  • Retrieving 300K+ recordsAlex Vishnev25 Oct
    • Re: Retrieving 300K+ recordsEarl Miles25 Oct
      • RE: Retrieving 300K+ recordsAlex Vishnev25 Oct
        • Re: Retrieving 300K+ recordsWarren Young27 Oct
      • RE: Retrieving 300K+ recordsAlex Vishnev26 Oct
        • Re: Retrieving 300K+ recordsWarren Young27 Oct
          • RE: Retrieving 300K+ recordsAlex Vishnev27 Oct
    • Re: Retrieving 300K+ recordsChris Frey26 Oct
      • Re: Retrieving 300K+ recordsEarl Miles26 Oct
        • Re: Retrieving 300K+ recordsChris Frey26 Oct
          • RE: Retrieving 300K+ recordsAlex Vishnev26 Oct
            • Re: Retrieving 300K+ recordsEarl Miles26 Oct
            • Re: Retrieving 300K+ recordsChris Frey26 Oct
  • Re: SSQLS contained within class definition compilation issuesahnkle28 Oct
    • New FeaturesFabricio Mota29 Oct
RE: SSQLS contained within class definition compilation issueswilliam.lieberman25 Oct
  • Re: SSQLS contained within class definition compilation issuesWarren Young27 Oct
Re: SSQLS contained within class definition compilation issuesWarren Young27 Oct