thanks!

qmake defines UNICODE in the makefile. I have erased this option and mingw compiled succesfully!
 
Regards,
Joel
 
On 7/29/06, Earnie Boyd <earnie@users.sourceforge.net> wrote:
Quoting Joel Prieto <joelprieto@gmail.com>:

> 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


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users