Cortex M4 on CW10 in Win7: How to build code with stricmp() support?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cortex M4 on CW10 in Win7: How to build code with stricmp() support?

Jump to solution
1,997 Views
UnisvrTim
Contributor III

Hi! I am new in CW. I searched the forum but not get the answer.

 

I created a new basic application project with mfs and rtcs support. Then I just added the following lines:

if(stricmp("abc", "Def") == 0) {

  printf("match\n");

} else {

  printf("not match\n");

}

 

the problem is:

 

if I do not #include <extras/extras_string.h>, then it complains about stricmp not defined.

 

If I do include the extras, then it will complain about: _io_strcasecmp... redeclared as ..., and: was originally defined as ... etc.

 

How to solve this problem?

 

Thank you for your help!

 

best regards,

 

Tim

Labels (1)
0 Kudos
Reply
1 Solution
1,616 Views
UnisvrTim
Contributor III

Just switched to CW10.2 and seems I can rebuild EWL as described.:smileyhappy:

View solution in original post

0 Kudos
Reply
4 Replies
1,616 Views
CrasyCat
Specialist III

Hello

 

    stricmp is not an ANSI standard library function. It is part of the EWL extra library.

 

    So if you want to be able to use that function in your code you need to rebuild the EWL library with EWL Extras Library  

    enabled.

    Please refer to the EWL C Reference manual chapter Configuring EWL for more information on how  to

    Configure EWL Extra library.

 

   Note that you can import the project arm-cortexm_lib from folder {Install]\MCU\ARM_EABI_Support\ewl to rebuild the library.

 

CrasyCat

0 Kudos
Reply
1,616 Views
UnisvrTim
Contributor III

I cannot rebuild the EWL library :smileysad:

 

In CW10+MQX3.7, the EWL project imported from {Install]\MCU\ARM_EABI_Support\ewl is named as: EWL_C.prject. The only build configuration is: Coldfire Toolchain Tools and selecting Build Project will do nothing.

 

Am I forced to write my own "extras"?

 

0 Kudos
Reply
1,617 Views
UnisvrTim
Contributor III

Just switched to CW10.2 and seems I can rebuild EWL as described.:smileyhappy:

0 Kudos
Reply
1,616 Views
UnisvrTim
Contributor III

Thank you for the reply! I will try that right away.

 

best regards,

 

Tim

0 Kudos
Reply