Show Posts
Pages: [1]
1  General Category / General Discussion / Re: multiple definition error on: November 24, 2012, 01:38:46 pm
thanks...

i used #include direktive with header file (lcd_lib.h) and problem solved...

smiley smiley
2  General Category / General Discussion / Re: multiple definition error on: November 24, 2012, 10:42:22 am
i want to create a library which contains routines that use LCD functions.
my library's begining:


//lcd_lib.cpp
#include <LiquidCrystal.h>
LiquidCrystal sysMon(12, 11, 5, 4, 3, 2);
.
.
.


And main unit:


//main_unit.cpp
#include "Arduino.h"
#include <LiquidCrystal.h>
#include "lcd_lib.cpp"

void setup()
{
...
 sysMon.begin(8,2,0);
...
}

.
.
.
.


if i compile this project in eclipse IDE, this message occurs:

../lcd_lib.cpp:13: multiple definition of `sysMon'
./main_unit.o:(.bss.sysMon+0x0): first defined here



3  General Category / General Discussion / multiple definition error on: November 24, 2012, 08:30:03 am
i want to define a LiquidCrystal variable out of main unit....
but when compiling the whole program, "multiple definition" error occurs...   smiley-mad
Pages: [1]