Search

IMPLEMENT_DYNAMIC produces compile error for statically linked MFC projects by MatthiasGross

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 763517
Opened: 9/19/2012 6:16:03 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
IMPLEMENT_DYNAMIC does not work for some base classes if MFCDLL is statically linked (when _AFXDLL is not defined)

IMPLEMENT_DYNAMIC(CGHLDevice, CObject)

gives the error line:
error C2039: 'classCGHLDevice': I no element of 'CGHLDevice' (translated from German VS 2012)

the same here:
IMPLEMENT_DYNAMIC(CPredefinedColorsListCtrl, CVSListBox)
gives a similar error

if I use
IMPLEMENT_DYNAMIC(CPredefinedColorsListCtrl, CListBox)
as a workaround the line can be compiled

so this problem occurs obviously with only a few base classes, here it is CObject and CVSListBox

when changing the project options to _AFXDLL these problems do not happen
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

create a new MFC project

make a new subclass derived from CObject or CVSListBox

add IMPLEMENT_DYNAMIC and DECLARE_DYNAMIC at the right locations

compile (statically linked)

Product Language

German

Operating System

Windows 7 SP1

Operating System Language

German

Actual results

can't compile

Expected results

compling works
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 9/24/2012 at 3:13 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 9/19/2012 at 8:21 PM
Thanks for your feedback.

In order to fix the issue, we must first reproduce the issue in our labs. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project so that we can conduct further research?

Please submit this information to us within 3 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 9/19/2012 at 6:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.