locked
Another about Warning C4679 RRS feed

  • Question

  • Thank to all who have responded to prvious postes of mine.  Your information has been informative and helpful.  I have read other threads regarding C4679 and have a question as to why it seems to have gone away.  I was receiving this warning, much like other authors, when attempting to utilize an unmanaged C++ class from managed C++ code.  I changed nothing other than making the methods which accessed the class object private and the warning went away.  I don't get it.  Any help would be appreciated.

    Midgel, Penguin Space Pilot

    Tuesday, April 3, 2012 2:48 PM

Answers

  • Hi m1rjj00,

    As far as I know, warning C4679 is a compiler warning at level 1. It indicates that the compiler encountered a construct that it cannot support, that cannot be imported from metadata. That is, it complains about the faws in code snippets. According to your description, I think it was the change you made that eliminated the warning.

    Generally speaking, we had better not mix the syntaxes of managed and unmanaged C++. I think the reason why you received these errors is that the codes are corrupt. If you want to know more information about C++/CLI syntax, please refer to this link: http://msdn.microsoft.com/en-us/magazine/cc163852.aspx.

    What's more, we are not able to reproduce this issue on our side. If you still have questions about this issue, I suggest you provide us the related codes. It should be better if you could provide codes before and after the changing, and the operation you did on the codes. You can pasted the codes here. Or you can upload your project on the SkyDrive: http://www.windowslive.co.uk/skydrive and share the link of the uploaded project.
    Best regards,


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Helen Zhao Wednesday, April 11, 2012 1:53 AM
    Thursday, April 5, 2012 2:20 AM