Unicode linker errors |
Post Reply |
Author | |
Andy
Newbie Joined: 23 June 2004 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 23 June 2004 at 9:05am |
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 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 |
|
Andy
Newbie Joined: 23 June 2004 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
Hi, Just to thank Oleg and Kirk at Codejock for solving this one. The problem was fixed by setting "Treat wchar as Built-In type" to "No" in the "C / C++ > Language" project settings. Many thanks to them for their support :) Best regards, |
|
--
Andy |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |