Link to home
Start Free TrialLog in
Avatar of boreilly
boreilly

asked on

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
Avatar of boreilly
boreilly

ASKER

Edited text of question.
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.
BUG: Error C2065: 'DDX_FieldDateTimeCtrl': Undeclared Identifier
http://support.microsoft.com/support/kb/articles/Q195/0/73.ASP
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.  
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.
Why don't you try with a skeleton application and then check if anything special is being done with that bok example?
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
It looks like a bug in Visual C++ 6.0. I can get it compiled by using COleDateTime instead of CTime.
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
>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.
Yes, this is what Mike Blaszczak said.

Bruce