Hi,
I'm getting problems building a very simple project with Unicode support when using XTPro 8.70 and VisualStudio 7.1. The process is easy to repeat:
1. Create a new project in VisualStudio: MFC MDI Application, use all defaults 2. Follow the steps described in the "XTPro Users Guide", "Tutorials - Create an application that has Office style toolbars and menus"
This compiles and runs OK. Now:
3. In the project settings, set "Use Unicode Character Set" and define "_UNICODE" in the preprocessor settings.
Now compiles with the following errors:
MainFrm.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CXTPToolBar * __thiscall CXTPCommandBars::Add(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >,enum XTPBarPosition,struct CRuntimeClass *)" (__imp_?Add@CXTPCommandBars@@QAEPAVCXTPToolBar@@V?$CStringT@ _WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@W4XTPB arPosition@@PAUCRuntimeClass@@@Z) referenced in function "protected: int __thiscall CMainFrame::OnCreate(struct tagCREATESTRUCTW *)" (?OnCreate@CMainFrame@@IAEHPAUtagCREATESTRUCTW@@@Z)
MainFrm.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CXTPMenuBar * __thiscall CXTPCommandBars::SetMenu(class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >,unsigned int)" (__imp_?SetMenu@CXTPCommandBars@@QAEPAVCXTPMenuBar@@V?$CStri ngT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@I@ Z) referenced in function "protected: int __thiscall CMainFrame::OnCreate(struct tagCREATESTRUCTW *)" (?OnCreate@CMainFrame@@IAEHPAUtagCREATESTRUCTW@@@Z)
The problem appears to happen if you use a VisualStudio 7.1 project as your starting point. We've used XTPro with projects created in VisualStudio 6 with Unicode in the past and they worked OK. Similarly, the demo projects that come with XTPro also appear to compile OK in Unicode.
Any help fixing this would be appreciated as it's stopping the development of a new Unicode program.
------------- --
Andy
|