wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.13k stars 1.04k forks source link

How do I compile and run serial_example in Ubuntu? #191

Closed tomsasson closed 5 years ago

tomsasson commented 5 years ago

So far I've been using Visual Studio 2017 to compile and run my version of test_serial project (with serial_example.cc). I would like to do the same on linux, so is there a Makefile or CMakeLists.txt file to compile and run an executable?

cubimon commented 5 years ago

run this from examples directory after running make:

g++ serial_example.cc -lserial -L ../build/devel/lib -I../include -o test_serial LD_LIBRARY_PATH=`pwd`/../build/devel/lib ./test_serial

make also builds the example, see build/devel/lib/serial/serial_example