Hi to all, I have in use the EC++ Compiler from Tasking and want to change my whole EC++ project to KEIL. I tried to compile some files with the KEIL EC166 but I always get the following error: ------------------ argument of type "char *" is incompatible with parameter of type "signed char *" ------------------ I give you a short eyample: #include <string.h> int func1() { char sHlp[10]; return strlen(sHlp); } The error is shown at the bold line. Could it be that the KEIL EC166 has the default 'char' defined as 'unsigned char'? And if this is so, is there a possibility to change this with a commandline-option or #pragma? Thank you for your help! Franz
My following routine goes well:
#include "string.h" #include "reg164.h" int func(){ char txt[10]; return strlen(txt); } void main(){ func(); while(1){;} }
Hi Perry, Do you rellay use the EC166-compiler (file ending .cpp - EC++)? best regards Franz
This looks like a bug in the compiler. There is a workaround:
#include <string.h> int func1() { signed char sHlp[10]; return strlen(sHlp); }
I'm sorry, my mistake. The bug is not in the compiler but in the header file string.h. In C++, the declaration should look like this
extern size_t strlen (char *);
extern size_t strlen (signed char *);
Hi Mike, Thank you! You are right - I just received a email from the technical support that this is a problem of the 'signed char' definitions in the headerfile in connection with the C166 and the run-time library. KEIL is working on this (I hope so)... best regards Franz
Hallo Franz, I'm now in the same situation like you, switching from Tasking to Keil. When i compiled my first Project with Keil EC166 I was surprised. Nothing works really. There is no Dokumentation about Keil EC166 compared to Tasking. And, i found out that there is no support for abstract classes. I can't understand. So I'm very interested in your experience with Keil EC166. Please contact me. Thank You Uli
just a thought, does the check box "Treat 'char" as 'unsigned char'" on the c166 tab have anything to do with this?
Hi, Since my first post, I got no positive answer from KEIL about this. I had to go on with Tasking - so I can't really say much about the current situation. best regards Franz