Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2008

Tip: Looking for answers? Try searching our database.

Problem with compiling  managed c++ code with added c - library with variable named generic

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
£ukasz - 21 Jan 2008 14:35 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 .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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.