Chinaunix首页 | 论坛 | 博客
  • 博客访问: 307033
  • 博文数量: 75
  • 博客积分: 2710
  • 博客等级: 少校
  • 技术积分: 706
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-21 14:19
文章分类

全部博文(75)

文章存档

2011年(10)

2010年(22)

2009年(43)

我的朋友

分类: C/C++

2011-05-27 21:30:14

msvc2008

之前,wchar_t 是作为 unsigned short 来处理的,从vs2008开始,默认将其作为内置类型来处理。

如果想仍将其作为 unsigned short 的别名:则需要

  • /Zc:wchar_t-



    When using QString::fromWCharArray(const wchar_t* , int size = - 1);

    vs2005 gives the following error:

    Qt Code:
    1. error LNK2019: unresolved external symbol "__declspec(dllimport)
    2. public: static class QString __cdecl QString::fromWCharArray(wchar_t const *,int)"
    3. (__imp_?fromWCharArray@@@SA?AV1@PB_WH@Z) referenced in function "public:
    4. void __thiscall midiIO::queryMidiInDevices(void)" (?queryMidiInDevices@midiIO@@QAEXXZ)
    To copy to clipboard, switch view to plain text mode 

    To fix this, go to Project --> Properties --> Configuration Properties -->
    C/C++ --> Language, and set 'Treat wchar_t as Built-in Type' to No.

    Hope it helps someone, it fixed my day...

    原文链接

阅读(3374) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~