-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error on installation #97
Comments
somebody ? pls |
Ensure you have wiringpi installed. Try with release 1.1.1. I just downloaded the tar and compiled it on my pi without any issues.
What's the output of |
I had the same problem. It seems to be a c++compiler issue but i fixed it. Used std::min and std::max instead of min and max. Also some incompatibility between integer and long integer. Fixed that as well. after that everything went well and Sprinkler_pi is working now. |
You shouldn't have to make any code changes to get it to compile though.
What is the output of gcc -v
Mine says gcc version 4.9.2 (Raspbian 4.9.2-10)
…On Thu, Aug 31, 2017 at 10:19 AM, vliegher ***@***.***> wrote:
I had the same problem. It seems to be a c++compiler issue but i fixed it.
Used std::min and std::max instead of min and max. Also some
incompatibility between integer and long integer. Fixed that as well. after
that everything went well and Sprinkler_pi is working now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#97 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKE3FzydvK5Cf1wqjEGfTuP8Gny0loWks5sdsDcgaJpZM4PDlk5>
.
|
Gcc version 6.3.0 rasbian 6.3.0-18 |
It says gcc version 6.3.0 and raspbian 6.3.0-18+ripl
… Op 31 aug. 2017, om 16:38 heeft Nick Horvath ***@***.***> het volgende geschreven:
You shouldn't have to make any code changes to get it to compile though.
What is the output of gcc -v
Mine says gcc version 4.9.2 (Raspbian 4.9.2-10)
On Thu, Aug 31, 2017 at 10:19 AM, vliegher ***@***.***> wrote:
> I had the same problem. It seems to be a c++compiler issue but i fixed it.
> Used std::min and std::max instead of min and max. Also some
> incompatibility between integer and long integer. Fixed that as well. after
> that everything went well and Sprinkler_pi is working now.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#97 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAKE3FzydvK5Cf1wqjEGfTuP8Gny0loWks5sdsDcgaJpZM4PDlk5>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#97 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AdtuHkvHqBm_qs4viH4WMSKTdH3NVMwEks5sdsVRgaJpZM4PDlk5>.
|
the macros are defined in port.h i don't know why it would not be loading them as it is included in Weather.cpp. |
copied |
It still concerns me... what about the other stuff in port.h is it being set properly? |
no other errors |
nvm... weather adjustments to 0... copied #ifndef max #ifndef min |
hi @piesio98 you can send me where you edit the file. |
@piesio98 in between where you paste this? |
/web somewhere at the top, before main code starts. |
`pi@raspberrypi:~/sprinklers_pi-1.1.0 $ make -lwiringpi
mkdir -p build
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION="1.1.0" -MF"build/Event.d" -MT"build/Event.d" -c -o "build/Event.o" "Event.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION="1.1.0" -MF"build/Logging.d" -MT"build/Logging.d" -c -o "build/Logging.o" "Logging.cpp"
gcc -O3 -Wall -fmessage-length=0 -MMD -MP -DLOGGING -DVERSION="1.1.0" -MF"build/Weather.d" -MT"build/Weather.d" -c -o "build/Weather.o" "Weather.cpp"
Weather.cpp: In member function ‘int Weather::GetScale(const Weather::ReturnVals&) const’:
Weather.cpp:181:69: error: ‘max’ was not declared in this scope
const int adj = min(max(0, 100+humid_factor+temp_factor+rain_factor), 200);
^
Weather.cpp:181:75: error: ‘min’ was not declared in this scope
const int adj = min(max(0, 100+humid_factor+temp_factor+rain_factor), 200);
^
Makefile:40: recipe for target 'build/Weather.o' failed
make: *** [build/Weather.o] Error 1
paste same thing here https://pastebin.com/raw/XbahU4Hb
what's wrong
before i'v done update, upgrade and everything from wiki installation
The text was updated successfully, but these errors were encountered: