Hello all
First sorry for poor English
I want to write a header for using in Arduino.
My header has also another header Wire.h the same as below.
But when I compile the program I have errors the same as bellow.
If somebody can , please help me.
Thanks.
//Errors:
c:/programfiles(x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/lib/avr5/crtmpo:(.init9+0x0): undefined reference to `main'collect2.exe: error: ld returned 1 exit status
Error compiling.
I tried this way ,but when I compile , it doesn't.
It can not find the direct of file. It is true for string.h or studio.h or Arduino.h but for Wire.h It is not.
Hi guys
I want to define a header that inside that I'm using function related to Wire.h header.
But when I use my header in arduino ,it doesn't compile and has the error "can not find direct of Wire.h".
It has no error when I use Arduino.h in my header or string.h , but about Wire.h and spi.h it has that error.
If somebody know, please help.
Thanks
In your #include statement, use angle brackets if the file is part of the standard arduino library (Wire.h), and use quotes if the include file is part of the project.
Your other problem - as far as I cam make out - is that you declare that I2CHasan has a function named I2CBegin, but you don't define that function anywhere. Now, I can see that this function is defined in I2CHasan.cpp, so it seems that this cpp file isn't being "linked" into the executable.