Why dcmtc3.6.1doesn't support unicode?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Zhaohui_Tian
Posts: 3
Joined: Wed, 2015-10-21, 10:46

Why dcmtc3.6.1doesn't support unicode?

#1 Post by Zhaohui_Tian »

Dear all:

My older project was using the version of 3.6.0, it was working. and all my project was based UNICODE.

I want to using the new feature about scppool. so i using the new version dcmtk-3.6.1_20150924.

But maybe this version can't support the UNICODE.

I have no way. pls help me.

Thanks!

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Why dcmtc3.6.1doesn't support unicode?

#2 Post by J. Riesmeier »

I'm sorry but your question is not 100% clear to me. If you are talking about the UNICODE (or _UNICODE) define on Windows systems, DCMTK never supported that. The following excerpt is from the INSTALL file:

Code: Select all

DCMTK does not compile when UNICODE or _UNICODE is defined because the
   VisualStudio compiler then uses the Unicode version instead of the ANSI
   version for all Windows API functions (i.e. type wchar_t instead of char
   for all character string parameters and return values).
If you were referring to character set conversions, you need the "libiconv" for that purpose.

Maybe, you could be more specific.

Zhaohui_Tian
Posts: 3
Joined: Wed, 2015-10-21, 10:46

Re: Why dcmtc3.6.1doesn't support unicode?

#3 Post by Zhaohui_Tian »

Thanks for your reply.

the building err:
\Program Files\DCMTK\include\dcmtk/oflog/tracelog.h(59): error C2678: 二进制“+”: 没有找到接受“const wchar_t [8]”类型的左操作数的运算符(或没有可接受的转换)
1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\comutil.h(173): 可能是“_bstr_t operator +(const char *,const _bstr_t &)”
1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\comutil.h(174): 或 “_bstr_t operator +(const wchar_t *,const _bstr_t &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(867): 或 “OFString operator +(const OFString &,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(874): 或 “OFString operator +(const char *,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(881): 或 “OFString operator +(char,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(888): 或 “OFString operator +(const OFString &,const char *)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(895): 或 “OFString operator +(const OFString &,char)”
1> 尝试匹配参数列表“(const wchar_t [8], dcmtk::log4cplus::tstring)”时
1>C:\Program Files\DCMTK\include\dcmtk/oflog/tracelog.h(64): error C2678: 二进制“+”: 没有找到接受“const wchar_t [8]”类型的左操作数的运算符(或没有可接受的转换)
1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\comutil.h(173): 可能是“_bstr_t operator +(const char *,const _bstr_t &)”
1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\comutil.h(174): 或 “_bstr_t operator +(const wchar_t *,const _bstr_t &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(867): 或 “OFString operator +(const OFString &,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(874): 或 “OFString operator +(const char *,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(881): 或 “OFString operator +(char,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(888): 或 “OFString operator +(const OFString &,const char *)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(895): 或 “OFString operator +(const OFString &,char)”
1> 尝试匹配参数列表“(const wchar_t [8], dcmtk::log4cplus::tstring)”时
1>C:\Program Files\DCMTK\include\dcmtk/oflog/logmacro.h(106): error C2665: “dcmtk::log4cplus::Logger::getInstance”: 2 个重载中没有一个可以转换所有参数类型
1> C:\Program Files\DCMTK\include\dcmtk/oflog/logger.h(112): 可能是“dcmtk::log4cplus::Logger dcmtk::log4cplus::Logger::getInstance(const dcmtk::log4cplus::tstring &)”
1> 尝试匹配参数列表“(const dcmtk::log4cplus::tchar *)”时
1>FsSCU.cpp(187): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
1> FsSCP.cpp
1>C:\Program Files\DCMTK\include\dcmtk/oflog/tracelog.h(59): error C2678: 二进制“+”: 没有找到接受“const wchar_t [8]”类型的左操作数的运算符(或没有可接受的转换)
1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\comutil.h(173): 可能是“_bstr_t operator +(const char *,const _bstr_t &)”
1> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\comutil.h(174): 或 “_bstr_t operator +(const wchar_t *,const _bstr_t &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(867): 或 “OFString operator +(const OFString &,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(874): 或 “OFString operator +(const char *,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(881): 或 “OFString operator +(char,const OFString &)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(888): 或 “OFString operator +(const OFString &,const char *)”
1> C:\Program Files\DCMTK\include\dcmtk/ofstd/ofstring.h(895): 或 “OFString operator +(const OFString &,char)”
1> 尝试匹配参数列表“(const wchar_t [8], dcmtk::log4cplus::tstring)”时

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Why dcmtc3.6.1doesn't support unicode?

#4 Post by J. Riesmeier »

Did you read and understand my previous posting?

By the way, error messages from the compiler should be in English (or German ;-)) language if you expect support from me.

Zhaohui_Tian
Posts: 3
Joined: Wed, 2015-10-21, 10:46

Re: Why dcmtc3.6.1doesn't support unicode?

#5 Post by Zhaohui_Tian »

Sorry for the language in my message, as my complier was not English version.

Pls see the picture:

In the project setting, General --- Character Set == "Use Unicode Character Set". It will be get the errors.


Image


Thanks again!

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Why dcmtc3.6.1doesn't support unicode?

#6 Post by J. Riesmeier »

As I said before: DCMTK does not support (and in fact never supported) the UNICODE/_UNICODE define. See above (or INSTALL file) for the explanation.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Google [Bot] and 1 guest