-
Notifications
You must be signed in to change notification settings - Fork 45
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
Syntax error in sunwait.cpp #37
Comments
Same issue when building as OpenWRT package:
Overcomed with exact version setting in Makefile:
(Before problematic 22b741a commit) |
Trying to compile on RASPI Bullseye. Excuse my ignorance, but I have placed the line cited above "PKG_SOURCE_VERSION:=102cb417ecbb7a3757ba9ee4b94d6db3225124c4" |
@likemotion using the You could probably try clone the repository and then switch version: git clone https://github.com/risacher/sunwait.git
cd sunwait
git checkout 102cb417ecbb7a3757ba9ee4b94d6db3225124c4
make |
Thanks very much Peter for your help;
sorry for the delay in following-up - its now working and can now get on with the next stage.
Fab service!
Cheers,
Mike
FYI here's the output I got:
***@***.***:~/sunwait $ make
gcc -c -Wall sunwait.cpp -o sunwait.o
sunwait.cpp: In function 'int main(int, char**)':
sunwait.cpp:665:62: warning: value computed is not used [-Wunused-value]
665 | if (arg[0] == '-' && arg[1] != '\0' && !isdigit(arg[1])) *arg++;
| ^~~~~~
gcc -c -Wall sunriset.cpp -o sunriset.o
sunriset.cpp: In function 'void sun_RA_dec(double, double*, double*, double*)':
sunriset.cpp:151:18: warning: variable 'zs' set but not used [-Wunused-but-set-variable]
151 | double xs, ys, zs;
| ^~
gcc -c -Wall print.cpp -o print.o
gcc sunwait.o sunriset.o print.o -o sunwait -lm -lstdc++
…----- Original Message -----
From: "petrjac" ***@***.***>
To: "risacher/sunwait" ***@***.***>
Cc: "likemotion" ***@***.***>, "Mention" ***@***.***>
Sent: Monday, 12 September, 2022 5:35:43 PM
Subject: Re: [risacher/sunwait] Syntax error in sunwait.cpp (Issue #37)
@likemotion using the PKG_SOURCE_VERSION is valid only for OpenWRT specific makefile .
You could probably try clone the repository and then switch version:
git clone https://github.com/risacher/sunwait.git cd sunwait
git checkout 102cb41
make
—
Reply to this email directly, view it on GitHub , or unsubscribe .
You are receiving this because you were mentioned. Message ID: <risacher/sunwait/issues/37/1243920955 @ github . com>
|
Hi @likemotion happy to hear that. This is only warnings from compiler. You can run sunwait from current directory:
|
Hi, thanks for this very useful piece of code that I've used for some time.
I've just cloned it onto my new Raspberry Pi and tried to run "make", and it fails in compilation in sunwait.cpp at lines 707 on, where the if statement has incorrect bracketing. I think it should be:
If I trusted my C++ and git skills more, I'd send a pull request.
The text was updated successfully, but these errors were encountered: