[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with conflicting declaration
From: |
Sergei Steshenko |
Subject: |
Re: Problem with conflicting declaration |
Date: |
Tue, 29 Jan 2013 10:28:17 -0800 (PST) |
----- Original Message -----
> From: Reza Housseini <address@hidden>
> To: help <address@hidden>
> Cc:
> Sent: Tuesday, January 29, 2013 7:36 PM
> Subject: Problem with conflicting declaration
>
> Hello list
>
> I'm writing an oct-file with an external library. The problem is, that
> this external library has a "typedef struct SparseMatrix" and I get
> the following error when compiling:
>
> /usr/include/Siconos/Numerics/SparseMatrix.h:46:3: error:
> conflicting declaration ‘typedef struct SparseMatrix SparseMatrix’
> /usr/include/octave-3.6.1/octave/dSparse.h:46:1: error: ‘class
> SparseMatrix’ has a previous declaration as ‘class SparseMatrix’
>
> How can I circumvent this problem?
>
> Thanks for any help!
>
> Cheers Reza
AFAIR it's
typedef old_type new_type;
.
And if SparseMatrix is already a struct, you do not need the 'struct' keyword
in 'typedef'.
Regards,
Sergei.