From: Earnie B. <ea...@us...> - 2006-07-29 13:13:57
|
Quoting Joel Prieto <joe...@gm...>: > Hi. I have a problem using serial port under WINDOWS. I have mingw compiler, > but when it compiles several errors appears. Can anybody help me?. I've > tried with others libraries to open serial port, buy I am still having the > same error message. > int openport(char *comport, HANDLE * cfd) > { > *cfd = > CreateFile(comport, GENERIC_READ | GENERIC_WRITE, 0, NULL, > OPEN_EXISTING, 0, NULL); > .................... > > } > serial.cpp: In function `int openport(char*, void**)': > serial.cpp:68: error: cannot convert `char*' to `const WCHAR*' for argument > `1' to `void* CreateFileW(const WCHAR*, DWORD, DWORD, _SECURITY_ATTRIBUTES*, > DWORD, DWORD, void*)' > You have two options: 1) Don't use UNICODE 2) Modify ``char *comport'' to read ``wchar *comport'' or ``tchar *comport'' Earnie Boyd http://shop.siebunlimited.com |