I have project that uses managed c++ where I use c - library, this library
contains some variables named generic, during compilation I get error: Error
1 error C2146: syntax error : missing ';' before identifier 'generic',
Problem is with name generic, unfortunately I cannot change this
name .How to solve this problem?
What to do to make it work?

Signature
Thanks,
£ukasz
--
pozdrawiam £ukasz
David Lowndes - 21 Jan 2008 17:19 GMT
>I have project that uses managed c++ where I use c - library, this library
>contains some variables named generic, during compilation I get error: Error
>1 error C2146: syntax error : missing ';' before identifier 'generic',
>Problem is with name generic, unfortunately I cannot change this
>name .
Do you have a minimal code example that illustrates this problem?
Dave
Cholo Lennon - 21 Jan 2008 17:56 GMT
> I have project that uses managed c++ where I use c - library, this
> library contains some variables named generic, during compilation I
[quoted text clipped - 3 lines]
> name .How to solve this problem?
> What to do to make it work?
Well, generic is a C++ CLI keyword and isn't context sensitive so I supose the
only way to solve the problem is renaming the variable(s) or use some pattern to
hide the offending names into a native code. Like David asked you, we need some
code to try a solution.
Regards
--
Cholo Lennon
Bs.As.
ARG
forever.zet@gmail.com - 21 Jan 2008 20:39 GMT
On 21 янв, 16:35, "£ukasz" <lza...@omnis.pl> wrote:
> I have project that uses managed c++ where I use c - library, this library
> contains some variables named generic, during compilation I get error: Error
[quoted text clipped - 9 lines]
> --
> pozdrawiam £ukasz
There is keyword "__identifier", which enables you to use keywords as
identifiers.
So if you were able to replace all references to "generic" name with
"__identifier(generic)"
that could probably solve your problem.
Thanks,
Sergey Zyuzin