Declaration conflict problem

Hi,

I want to integrate two libraries by putting them together in the same file, and then I want to use the multiple inheritance method for processing all the data coming from the other 2 classes.

But when I do this, it appears a conflict which in the compiler status is saying something like this:/Wire.h:74: error: multiple types in one declaration

I suppose it's coming from my defines in the header files (which now are grouped together), because I've saw that a large number of defines have the same types.

What could be the solution here, considering that I don't want to change the definitions? (putting the data in separate files won't help)

Thank you,
RobertEagle

I want to integrate two libraries …

What two libraries?

I suppose it’s coming from my defines in the header files …

What defines?


This is pretty close to “I have some code that produces an error message.” You won’t get much help without a lot more details.

Too many possibilities without code, although you have most probably left a semicolon off the end of one of your classes.

Yes. I found the problem.
I forgot a semicolon at a class.

Thank you,
RobertEagle

Again, now it appears to work. But it appeared another problem.
When I get the values from each class the data seems to be disturbed by something, seems not right. (this happens when I put the classes in the same file).
But when I get the values from different files in the sketch everything is okay.
What I know is that the classes don't interfere between them unless a connection is made.
What could be the problem? Should I post the entire library here?

Should I post the entire library here?

Only if you want help.

http://www.4shared.com/zip/xkSLaAKf/IMU.html, and if it asks for a password, enter arduino/Arduino.

The altered data comes from the getValues functions.

Thank you,
RobertEagle

RobertEagle:
But when I get the values from different files in the sketch everything is okay.
What could be the problem? Should I post the entire library here?

Google: static initialization order fiasco

When things mysteriously work/don't work when you move them from file to file that could be the issue.


... the data seems to be disturbed by something, seems not right ...

You know what you mean, but we don't.

pYro_65:
Too many possibilities without code, although you have most probably left a semicolon off the end of one of your classes.

This is exactly what caused the same problem for me.

For classes, you need to put at ; after then ending }. As far as I can tell, for all other things (functions, loops, etc.) you don't need to do that, but for classes you do.

Quirk, but okay. Glad I found it!