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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
chensuCommented:
BUG: Error C2065: 'DDX_FieldDateTimeCtrl': Undeclared Identifier
http://support.microsoft.com/support/kb/articles/Q195/0/73.ASP
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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
mikeblasCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.