Hi there again,
i have the Rasp. Pi3 mod. B with Kit GrovePi+ and im writing with c++.
Seems there is a problem when i try to use the grove_dht_pro & grove_rgb_lcd in
a single programm. The header files override each other so i can only use one
device in a programm.
Do i have a code problem?!?
code goes here ->
compiler says: “error: ‘DHT’ was not declared in this scope”
… when i rewrite the code 2 thiz:
then compiler says: “error: ‘LCD’ was not declared in this scope”
thx in advance
So I’ve compiled the following code and I didn’t have a problem with the latest GrovePi repo.
Apart from this small example, I’ve also compiled the rest of example programs in the
Software/Cpp folder of the
GrovePi repo and I haven’t had any problems.
This tells me you:
Haven’t installed the package and you’re compiling as if you have the package installed.
Or that you have installed the package but you’re not compiling the code right.
In either case, you have to follow the instructions provided in our repo as they explain how a program has to be compiled.
So, please read the README provided on the following GitHub page:
If there are any other questions regarding this topic, please feel free to tell us.
hi lucian, thx for your reply(s),
i copied the code of the header files into a single header file and removed the
"#ifndef" and “#endif” in both. … perhaps namespaces proplem or so, but i think
That’s great to hear. I would though advice you to follow the instruction we have provided.
But then again, whatever works for you is also great.
This topic was automatically closed after 19 hours. New replies are no longer allowed.