Giter Club home page Giter Club logo

Comments (6)

wjwwood avatar wjwwood commented on July 21, 2024

I can compile example locally on my Mac and the definition for that function is in the serial/serial.h header:

https://github.com/wjwwood/serial/blob/master/include/serial/serial.h#L734

Can you give more info on how you are building this?

from serial.

ejb1123 avatar ejb1123 commented on July 21, 2024
ej@ej-Lenovo-G510s-Touch:~/Documents/git/serial$ make
cd build && cmake -DCMAKE_INSTALL_PREFIX=/tmp/usr/local ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using CATKIN_DEVEL_PREFIX: /home/ej/Documents/git/serial/build/devel
-- Using CMAKE_PREFIX_PATH: 
-- Found PythonInterp: /usr/bin/python (found version "2.7.6") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ej/Documents/git/serial/build/test_results
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.9
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ej/Documents/git/serial/build
cd build && make
make[1]: Entering directory `/home/ej/Documents/git/serial/build'
make[2]: Entering directory `/home/ej/Documents/git/serial/build'
make[3]: Entering directory `/home/ej/Documents/git/serial/build'
Scanning dependencies of target serial
make[3]: Leaving directory `/home/ej/Documents/git/serial/build'
make[3]: Entering directory `/home/ej/Documents/git/serial/build'
[ 25%] Building CXX object CMakeFiles/serial.dir/src/serial.cc.o
[ 50%] Building CXX object CMakeFiles/serial.dir/src/impl/unix.cc.o
[ 75%] Building CXX object CMakeFiles/serial.dir/src/impl/list_ports/list_ports_linux.cc.o
Linking CXX shared library devel/lib/libserial.so
make[3]: Leaving directory `/home/ej/Documents/git/serial/build'
[ 75%] Built target serial
make[3]: Entering directory `/home/ej/Documents/git/serial/build'
Scanning dependencies of target serial_example
make[3]: Leaving directory `/home/ej/Documents/git/serial/build'
make[3]: Entering directory `/home/ej/Documents/git/serial/build'
[100%] Building CXX object CMakeFiles/serial_example.dir/examples/serial_example.cc.o
Linking CXX executable devel/lib/serial/serial_example
make[3]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target serial_example
make[2]: Leaving directory `/home/ej/Documents/git/serial/build'
make[1]: Leaving directory `/home/ej/Documents/git/serial/build'

from serial.

wjwwood avatar wjwwood commented on July 21, 2024

@ejb1123 that looks like a successful build to me 😄

You can try make test to make sure stuff builds and run against it.

from serial.

ejb1123 avatar ejb1123 commented on July 21, 2024
ej@ej-Lenovo-G510s-Touch:~/Documents/git/serial$ make test 
cd build && cmake -DCMAKE_INSTALL_PREFIX=/tmp/usr/local ..
-- Using CATKIN_DEVEL_PREFIX: /home/ej/Documents/git/serial/build/devel
-- Using CMAKE_PREFIX_PATH: 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ej/Documents/git/serial/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.9
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ej/Documents/git/serial/build
cd build && make run_tests
make[1]: Entering directory `/home/ej/Documents/git/serial/build'
make[2]: Entering directory `/home/ej/Documents/git/serial/build'
make[3]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[ 14%] Built target gtest
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[ 28%] Built target gtest_main
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[ 71%] Built target serial
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[ 85%] Built target serial-test-timer
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[ 85%] Built target clean_test_results
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target serial-test
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target tests
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
-- run_tests.py: execute commands
  /home/ej/Documents/git/serial/build/devel/lib/serial/serial-test-timer --gtest_output=xml:/home/ej/Documents/git/serial/build/test_results/serial/gtest-serial-test-timer.xml
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from timer_tests
[ RUN      ] timer_tests.short_intervals
[       OK ] timer_tests.short_intervals (937 ms)
[ RUN      ] timer_tests.overlapping_long_intervals
[       OK ] timer_tests.overlapping_long_intervals (1011 ms)
[----------] 2 tests from timer_tests (1948 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (1949 ms total)
[  PASSED  ] 2 tests.
-- run_tests.py: verify result "/home/ej/Documents/git/serial/build/test_results/serial/gtest-serial-test-timer.xml"
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target _run_tests_serial_gtest_serial-test-timer
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
-- run_tests.py: execute commands
  /home/ej/Documents/git/serial/build/devel/lib/serial/serial-test --gtest_output=xml:/home/ej/Documents/git/serial/build/test_results/serial/gtest-serial-test.xml
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from SerialTests
[ RUN      ] SerialTests.readWorks
[       OK ] SerialTests.readWorks (1 ms)
[ RUN      ] SerialTests.writeWorks
[       OK ] SerialTests.writeWorks (0 ms)
[ RUN      ] SerialTests.timeoutWorks
[       OK ] SerialTests.timeoutWorks (249 ms)
[ RUN      ] SerialTests.partialRead
[       OK ] SerialTests.partialRead (250 ms)
[----------] 4 tests from SerialTests (500 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (500 ms total)
[  PASSED  ] 4 tests.
-- run_tests.py: verify result "/home/ej/Documents/git/serial/build/test_results/serial/gtest-serial-test.xml"
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target _run_tests_serial_gtest_serial-test
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target _run_tests_serial_gtest
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target _run_tests_serial
make[4]: Entering directory `/home/ej/Documents/git/serial/build'
make[4]: Leaving directory `/home/ej/Documents/git/serial/build'
[100%] Built target run_tests
make[3]: Leaving directory `/home/ej/Documents/git/serial/build'
make[2]: Leaving directory `/home/ej/Documents/git/serial/build'
make[1]: Leaving directory `/home/ej/Documents/git/serial/build'
ej@ej-Lenovo-G510s-Touch:~/Documents/git/serial$ 

from serial.

wjwwood avatar wjwwood commented on July 21, 2024

That looks like a success to me too, maybe you had an old version of the serial library lying around and when you compile it found the new header, but when you tried to link you got the old version of the library.

Either was I don't see any issue with the output you posted above.

from serial.

ejb1123 avatar ejb1123 commented on July 21, 2024

Thanks for the help i got it working in code blocks.
I had to set the the linker setting by pointing it to /usr/local/lib/libserial.so

from serial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.