complile error with obd.h&obd.cpp

Inquiry and support for Freematics products
Post Reply
soldat
Posts: 1
Joined: Mon Mar 27, 2017 2:17 pm

complile error with obd.h&obd.cpp

Post by soldat »

Hi everyone,

We are trying to compile and connect to OBD-II UART Adapter V1 from arduino UNO and got following complie error. Anybody have any idea ?

Hardware: Freematics OBD-II UART Adapter V1
library: (OBD.H and OBD.cpp) from OBD-II for Arduino project on sourceforge.net arduino-obd-library-20170304.zip
Arduino IDE 1.7.9

and , for the most important, we cann't open Github.com website ( in a province of China), was not able to download /libraries/OBD2UART. It would be appreciated if anybody E-mail that for us , mamatjan_t at sina.com, Thanks.


Error message:

OBD.cpp:467:72: error: default argument given for parameter 2 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive] bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0) ^ In file included from OBD.cpp:10:0: OBD.h:133:15: error: after previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive] virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0); ^ OBD.cpp:467:72: error: default argument given for parameter 3 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive] bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0) ^ In file included from OBD.cpp:10:0: OBD.h:133:15: error: after previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive] virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0); ^ OBD.cpp:467:72: error: default argument given for parameter 4 of 'bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive] bool COBD::memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0) ^ In file included from OBD.cpp:10:0: OBD.h:133:15: error: after previous specification in 'virtual bool COBD::memsRead(int*, int*, int*, int*)' [-fpermissive] virtual bool memsRead(int* acc, int* gyr = 0, int* mag = 0, int* temp = 0);
td1973
Posts: 17
Joined: Mon Apr 10, 2017 4:35 am

Re: complile error with obd.h&obd.cpp

Post by td1973 »

I had the same error.

You need to copy OBD.h and OBD.cpp to the libraries root directory, not in the source folder!

IE: ProgramFiles(x86)]\Arduino\libraries\OBD.h
IE: ProgramFiles(x86)]\Arduino\libraries\OBD.cpp
p m sanjeev
Posts: 1
Joined: Thu Oct 24, 2019 9:53 pm

Re: complile error with obd.h&obd.cpp

Post by p m sanjeev »

Hi i am unable to add the OBD 2 UART adapter library in the Arduino IDE its showing error as folder does not contain valid library.please can any one help me with this how to resolve error.
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: complile error with obd.h&obd.cpp

Post by stanley »

How did you import the library? Did you just download the github pages?
Post Reply