Hello All
This is my first post and I'm new to both C++ programming and Code:Blocks, so please be gentle!
I'm trying to write and compile a serial comms console program under Linux, using ncurses and libSerial, that can then be run on another "vanilla" Linux machine - both machines are running Debian Wheezy 7.3 and the coding is done using Code::Blocks 13.12. The reason behind this is that I do my coding on a desktop PC at home, and need to run the code on a small laptop PC.
The program compiles and runs fine on the original machine but when I transfer the executable to the second machine, I get an "Error opening terminal: xterm" message - xterm is installed on both machines!
My includes are as follows:
#include <cstdlib>
#include <ncurses.h>
#include <SerialStream.h>
#include <cstring>
#include <iostream>
and I've made sure that the ncurses and libSerial libraries are included in the
Link Libraries list in Project -> Build Options -> Linker Settings.
Another post recommended setting the "-static" and "-static-libgcc" options under
Other Linker Options in Project -> Build Options -> Linker Settings and whilst my Debug executable increases in size from ~320K to ~1.6M, I get the same error! I also tried running the executable on another machine running Ubuntu 12.10, but got the same result.
Can anyone advise if what I want to do is feasible and, if so, how to set up C::B to achieve the required result.
Thanks in advance,
Derek.