Send texts to CFA634

myblessing

New member
Hi,

I'm doing a student project and just bought CFA634 to show status of my product. So, I want to send texts to show on this screen. I'm using Windows XP 32 bits and Visual Studio 2008 Pro (free trial) and has downloaded WinTest source code. I'm a newbie in C++ and HID devices. When I try to build solution by VS, some errors occur:
Code:
1>ScrollPopupDlg.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const CDialog::messageMap" (?messageMap@CDialog@@1UAFX_MSGMAP@@B)
1>WinTestDlg.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const CDialog::messageMap" (?messageMap@CDialog@@1UAFX_MSGMAP@@B)
1>ScrollPopupDlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CString::~CString(void)" (??1CString@@QAE@XZ) referenced in function "protected: virtual void __thiscall CScrollPopupDlg::OnOK(void)" (?OnOK@CScrollPopupDlg@@MAEXXZ)
1>WinTestDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CString::~CString(void)" (??1CString@@QAE@XZ)
1>ScrollPopupDlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CString::operator char const *(void)const " (??BCString@@QBEPBDXZ) referenced in function "protected: virtual void __thiscall CScrollPopupDlg::OnOK(void)" (?OnOK@CScrollPopupDlg@@MAEXXZ)
1>WinTestDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CString::operator char const *(void)const " (??BCString@@QBEPBDXZ)
1>ScrollPopupDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CWnd::GetWindowTextA(class CString &)const " (?GetWindowTextA@CWnd@@QBEXAAVCString@@@Z) referenced in function "protected: virtual void __thiscall CScrollPopupDlg::OnOK(void)" (?OnOK@CScrollPopupDlg@@MAEXXZ)
1>WinTestDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CWnd::GetWindowTextA(class CString &)const " (?GetWindowTextA@CWnd@@QBEXAAVCString@@@Z)
1>ScrollPopupDlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CString::CString(void)" (??0CString@@QAE@XZ) referenced in function "protected: virtual void __thiscall CScrollPopupDlg::OnOK(void)" (?OnOK@CScrollPopupDlg@@MAEXXZ)
1>WinTestDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CString::CString(void)" (??0CString@@QAE@XZ)
1>WinTest.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const CWinApp::messageMap" (?messageMap@CWinApp@@1UAFX_MSGMAP@@B)
1>WinTestDlg.obj : error LNK2019: unresolved external symbol "public: int __thiscall CString::IsEmpty(void)const " (?IsEmpty@CString@@QBEHXZ) referenced in function "protected: virtual int __thiscall CWinTestDlg::OnInitDialog(void)" (?OnInitDialog@CWinTestDlg@@MAEHXZ)
1>WinTestDlg.obj : error LNK2019: unresolved external symbol "public: int __thiscall CString::LoadStringA(unsigned int)" (?LoadStringA@CString@@QAEHI@Z) referenced in function "protected: virtual int __thiscall CWinTestDlg::OnInitDialog(void)" (?OnInitDialog@CWinTestDlg@@MAEHXZ)
1>WinTestDlg.obj : error LNK2019: unresolved external symbol "public: long __thiscall CWnd::SendMessageA(unsigned int,unsigned int,long)" (?SendMessageA@CWnd@@QAEJIIJ@Z) referenced in function "protected: void __thiscall CWinTestDlg::OnPaint(void)" (?OnPaint@CWinTestDlg@@IAEXXZ)
1>.\Debug/WinTest.exe : fatal error LNK1120: 9 unresolved externals
I guess some files are missing, but I have no idea how to fix it. There is no Readme file in the .zip file. I wonder that if there are some examples that I can follow.....

Thanks a lot!
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Tech

Administrator
In this thread:

http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/e0655c1e-6c9d-4091-8cc3-2440e14bbbc9

He says:
Just change "Project | Properties | Configuration Properties | Linker | System | Subsystem" from "Windows (/SUBSYSTEM:WINDOWS)" to "Console (/SUBSYSTEM:CONSOLE)", and switch off /clr from "Project | Properties | Configuration Properties | General | Common Language Support", since I don't see any managed code in your project, so you don't need it.
This one:

http://bytes.com/groups/net-vc/5717...-dll-export-functions-using-cstring-parameter

Says:
Did you recompile everything with VC7? You CANNOT mix MFC Dlls from VC6
and VC7 (and the error you are getting says it can't find a VC7 CString
function - sounds like your Dlls are still VC6)
Bob
Maybe see if either of those help?
 

myblessing

New member
there are still some errors:

1>libcmtd.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>.\Debug/WinTest.exe : fatal error LNK1120: 1 unresolved externals

Another thing is what is VC7? Can I use Visual Studio 2008 to compile the code?

Thanks again!
 

CF Tech

Administrator
That code was all developed under VC6, which is now quite old.

It sounds like a few (thousand?) things have changed between VC6 and Visual Studio 2008 Pro (free trial).

___tmainCRTStartup is something that VC6 created as part of the project, not something that the WinTest authors put in.

It might be best to start a new project in Visual Studio 2008 Pro (free trial) and then manually add the old files over into it.
 

myblessing

New member
Are there any quick ways that I can solve this problem without going through all the code? Or, should I try other software that you have?
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

CF Tech

Administrator
I do not know of a quick way.

Maybe there is a guide from Microsoft on porting code from VC6 to Visual Studio 2008 Pro (free trial).
 
Top