Serial Port Programming

M

Thread Starter

Michael Mesolella

Error: In BC++ the proper include files are "included" and the compiler still says that the function outportb doesn't exist.
Any help would be great!
 
R

Raul Mario del Toro

I´m working in C++ Builder 3.0 and this function does´nt exist, to work with the serial ports i have used the functions from Windows API CreateFile, WriteFile, ReadFile and others that you can call them only including the vcl.h.

If this function exist in BC++ may be you are not including the necesary file correctly, remember that there are two ways to include a file:

#include "file.h"
or
#include <file.h>

If you are using the first way the compiler check for the file in the same directory and in the second way the path of file.h most be declared in the options of the project.

I hope this information can help you.

Raul Mario
 
B
Do not use outportb as this function is not supported in windows NT,2000 and XP. Instead use the windows API functions. Search for SetupComm in the windows SDK help to read more.

Best regards
http://www.wittecom.com
 
Top