next up previous contents
Next: Why does the communication through the serial port not work? Up: FAQ Previous: FAQ   Contents

Why is the program failing when I use serial port communication?

If you try to use the serial port communication without having the LibSerial support, the constructor will fail and throw a LibSerialNotAvailable exception. It means that when the configure script has not detected the LibSerial library on your computer. Check your config.log, it should contain something like that:


\begin{lstlisting}[caption={\texttt{config.log} sample},
label=shell:config]
c...
...hecking for main in -lserial
[...]
configure:XXX: result: yes
\end{lstlisting}

If the result is no, please specify the header and library path in CPPFLAGS and LDFLAGS. For instance, if you are using gcc (which is usually the case), it should be something like that:


\begin{lstlisting}[caption={Invoking \texttt{configure} when using non-standard ...
...LAGS=-I/my/path/to/libserial \
LDFLAGS=-L/my/path/to/libserial
\end{lstlisting}

Note: if you have installed a package to get this library, please ask the maintainer of the package for your distribution to enable the LibSerial support.


next up previous contents
Next: Why does the communication through the serial port not work? Up: FAQ Previous: FAQ   Contents
2008-08-29