Wide Character Support

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Wide Character Support

1,317 次查看
amish_M4
Contributor I

We are using Code Warrior 10.1 for a Kinetis project and are attempting to port code that compiles and links fine with Green Hills and MS VS. The code makes use of wide string types and functions such as wcscpy(). We are getting link errors on the wide string functions. Does Code Warrior support these functions?

标签 (1)
0 项奖励
7 回复数

974 次查看
lorenzofornari
Contributor III

Hello,

i'm trying to include wchar.h in my project, to use library's functions swprintf, wscpy...

i'm on CW 10.3, using MQX4 on Kinetis Platform.

Simply including "wchar.h" doesn't provide functions, because of some directives that exclude code from compiling...

So i modified "ansi_prexif.ARM.h" defining _EWL_WIDE_CHAR=1.

After that i get a very long list of redefined items... i guess similar to this discussion:

https://community.freescale.com/message/315678#315678

Someone get it working on CW as well as Keil uvision?

0 项奖励

974 次查看
J2MEJediMaster
Specialist I

I poked around in the CodeWarrior for MCU directory for ARM support and the wide character header file is there. You may need to set a compiler switch that enables wide character support. Proceed as follows:

 

1) In the C/C++ perspective, select the project you are using in the CodeWarrior Prohects view,

2) Choose Project > Properties.

3)  In the Properties <projectname> window that appears, expand C/C++ Build and select Settings.

4) Under ARM Compiler, choose Language and see if Enable wchar_t support is checked.

 

---Tom

0 项奖励

974 次查看
amish_M4
Contributor I

Tom, thanks for the reply. I saw this option and made sure it was checked. It seems to affect the wchar_t type but not the actual wide character function support.

0 项奖励

974 次查看
J2MEJediMaster
Specialist I

OK, consult the CodeWarrior EWL C Reference manual (EWL C Reference.pdf), which is located in the Help folder of your CodeWarrior installation. It has information on how to enable wide character facilities.

 

---Tom

0 项奖励

974 次查看
amish_M4
Contributor I

Thanks for the input.  Do you know where the instructions are for building the lib?

0 项奖励

974 次查看
J2MEJediMaster
Specialist I

The ewl source and make files are in {CodeWarrior Installation}\MCU\ARM_EABI_Support\ewl.

 

For further assistance, you probably need to file a service request. Click here to file an on-line service request.

 

---Tom

0 项奖励

974 次查看
amish_M4
Contributor I

Yes, we found the directions and attempted to follow them. It apears that there is a problem with the make file. I am not an expert, but someone else that looked at it said they thought that some of the make fille commands looked like they were for Linux and not windows OS.

 

 

0 项奖励