Connecting Tech Pros Worldwide Forums | Help | Site Map

serial port in mingw

Member
 
Join Date: Jun 2008
Location: Igualada (Barcelona)
Posts: 86
#1: Sep 2 '08
I've programmed the serial port in *NIX OS's in the past, using the termios interface.

Does anybody know what should/can I do to program the serial port using minGW in windows (XP/Vista)? (i.e. which library should I include, and where is it documented?)

Thanks!

Member
 
Join Date: Jun 2008
Location: Igualada (Barcelona)
Posts: 86
#2: Sep 3 '08

re: serial port in mingw


Ok,

After some research, I see that by including <windows.h> in my program, I can compile the "canonic" example from MSDN to succesfully access serial port in code for mingw.

So I guess my question had a fundamental error of not understanding what mingw is meant to do.

I wonder now if somebody knows of any good LGPL-licensed cross-platform libary to access the serial port, with both a windows and linux ports. My idea is to develop an application using the serial port that can be compiled in both linux and windows using GCC, which of course I can't achieve by using windows' API.

Thanks.-
Reply