DDX_DateTimeCtrl undefined symbol

I must be doing something stupid but when I try to make a debug build, the linker says that DDX_DateTimeCtrl is an undefined symbol.  I am using MSVC 6.0 with service pack 3.  I am using the non-UNICODE version of MFC as a shared DLL.  So far, this problem has occurred on every machine where I have tried it.  Examining the MFC .lib files with DUMPBIN, I see that the offending symbol is present in the release lib file but not in the debug version.  What puzzles me is that no one else out in the newsgroups or elsewhere seems to be having this problem.  Microsoft does not list it as a known problem.  Does anyone know what might be wrong?

Thank you,
Bruce O'Reilly
boreillyAsked:
Who is Participating?
 
mikeblasConnect With a Mentor Commented:
I wrote these functions for MFC. There's no bug here.

In DEBUG builds, the functions are exported from MFCO42D.DLL, not MFC42D.DLL.  If you don't have these symbols coming from MFCO42D.DLL, you have a bad version of the library on your machine.

?DDX_DateTimeCtrl@@YGXPAVCDataExchange@@HAAVCOleDateTime@@@Z 0040225c f   mfco42d:MFCO42D.DLL

?DDX_DateTimeCtrl@@YGXPAVCDataExchange@@HAAVCTime@@@Z 00401134 f   mfco42d:MFCO42D.DLL

If you can't link to them, the most likely cause is that you're not linking to MFCO42D.LIB. You can have MFC do that automatically for you by referencing AFXDISP.H in your source.

..B ekiM
0
 
boreillyAuthor Commented:
Edited text of question.
0
 
naveenkohliCommented:
I have not seen any link errors with DDX_DateTimeCtrl call in debug builds. If you can post the DoDataExchange function of your code, that may help a little bit.
Are you doing anything special with this Control? Try creating an application with nothing special (just what u get with wizard) and add DateTime control on the dialog box. Then see if you get the same link error.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
chensuCommented:
BUG: Error C2065: 'DDX_FieldDateTimeCtrl': Undeclared Identifier
http://support.microsoft.com/support/kb/articles/Q195/0/73.ASP
0
 
boreillyAuthor Commented:
I am rejecting the answer because the problem is with DDX_DateTimeCtrl(), not with DDX_FieldDateTimeCtrl().  I am familiar with the Knowledge Base article cited by chensu, but it does not apply.  The KB article pertains to a different function than the one I am having a problem with and concerns a compile time error not a link error.

 One example that will produce this error is the sample program "DirList1" from Ch. 5 of Beck Zaratian's "Microsoft Visual C++ 6.0 Programmer's Guide" (Microsoft Press).  I could post the files from the example, but there's nothing special about the call.  
0
 
chensuCommented:
Sorry, I didn't read the question carefully. Email me the sample at chensu@hotmail.com so that I can take a look. It is interesting.
0
 
naveenkohliCommented:
Why don't you try with a skeleton application and then check if anything special is being done with that bok example?
0
 
boreillyAuthor Commented:
Hi Chensu,
I sent the files.

Bruce


Hi Naveenkohli,
Yes, I will make a skeleton app when I get off of work today. No time to do it here.

Bruce
0
 
chensuCommented:
It looks like a bug in Visual C++ 6.0. I can get it compiled by using COleDateTime instead of CTime.
0
 
boreillyAuthor Commented:
Thanks Mike.  I'm totally impressed that you answered this question.  I spent all my book money until December, but you can be sure I'll buy the new edition of your book next month.  I live by the previous version.

Bruce O'Reilly
0
 
chensuCommented:
>You can have MFC do that automatically for you by referencing AFXDISP.H in your source.

No wonder using COleDateTime is OK. COleDateTime requires AFXDISP.H.
0
 
boreillyAuthor Commented:
Yes, this is what Mike Blaszczak said.

Bruce
0
All Courses

From novice to tech pro — start learning today.