K
K
KirillDe7772014-12-22 03:28:28
Eclipse
KirillDe777, 2014-12-22 03:28:28

How to configure compiler in eclipse?

Hello.
I'm trying to control an arduino from a computer. I write the code in eclipse (Ubuntu OS.), but the following errors occur during compilation. For port communication I use LIBSERIAL

23:31:08 **** Incremental Build of configuration Debug for project Arduino ****
make all
Building file: ../src/Arduino.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage -length=0 -MMD -MP -MF"src/Arduino.d" -MT"src/Arduino.d" -o "src/Arduino.o" "../src/Arduino.cpp"
In file included from . ./src/Arduino.cpp:11:0:
/usr/include/SerialStreamBuf.cc: In member function 'int LibSerial::SerialStreamBuf::SetParametersToDefault()':
/usr/include/SerialStreamBuf.cc:171:40: error: 'bzero' was not declared in this scope
bzero( &tio.c_cc, sizeof(tio.c_cc) );
^
make: *** [src/Arduino.o] Error 1
23:31:09 Build Finished (took 437ms)

I don’t understand where they come from, because. I do everything according to the example that I took here . The most interesting thing is that if you compile via makefile, then the compiler does not write any errors and everything works fine!
But the interesting thing is that the author takes the libraries in -lserial -L/usr/lib when eclipse includes them from usr/include, and where the author takes them they are simply not there!
It's clear that I'm doing something wrong. Can you please tell me how to set it up correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tsarevfs, 2014-12-22
@tsarevfs

Solution (add include strings.h or find a newer version)
*.h files with source code are included from include. lib contains compiled libraries. -lserial includes the libserial library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question