KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a header file in a managed DLL project like so: Enums.h: #pragma once ... public ref struct ManagedStruct { Bitmap^ image; } ... This header is referenced both from another class in the DLL and from a separate executable. The managed struct alone is generating: error C2011: 'ManagedStruct' : 'class' type redefinition. If I move the struct to the main header file in the DLL it works fine, and is publicly accessible, so that's what I'm doing, but I would very much like to learn why this is happening when I just move it to another file. I have checked all necessary includes and namespaces AND tried the obvious header guards, to no avail; I still get the error. Thanks very much for any insight!
Tags (comma-separated)
Save Edits
Cancel