Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ Error with new cygwin
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Ardentcrest
(47 posts) Bio
|
Date
| Wed 12 Sep 2018 07:10 AM (UTC) |
Message
| I'm getting this error with cygwin
$ make
make -s smaug
Compiling o/imc.o....
imc.c: In function ‘void imc_update_tellhistory(CHAR_DATA*, const char*)’:
imc.c:1565:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if( IMCTELLHISTORY( ch, x ) == '\0' )
^~~~
make[1]: *** [Makefile:102: o/imc.o] Error 1
make: *** [Makefile:46: all] Error 2
any help | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 12 Sep 2018 02:17 PM (UTC) Amended on Wed 12 Sep 2018 02:18 PM (UTC) by Nick Gammon
|
Message
| \0 is really zero, so try replacing that with just 0. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Ardentcrest
(47 posts) Bio
|
Date
| Reply #2 on Wed 12 Sep 2018 05:22 PM (UTC) Amended on Wed 12 Sep 2018 06:08 PM (UTC) by Ardentcrest
|
Message
| that worked now getting this
Compiling o/act_wiz.o....
act_wiz.c: In function ‘bool create_new_race(int, char*)’:
act_wiz.c:8824:6: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
bool create_new_race( int rcindex, char *argument )
^~~~~~~~~~~~~~~
act_wiz.c:8834:12: note: ‘snprintf’ output between 1 and 17 bytes into a destination of size 16
snprintf( race_table[rcindex]->race_name, 16, "%-.16s", argument );
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:102: o/act_wiz.o] Error 1
make: *** [Makefile:46: all] Error 2
| Top |
|
Posted by
| Ardentcrest
(47 posts) Bio
|
Date
| Reply #3 on Mon 17 Sep 2018 07:52 PM (UTC) |
Message
| Found out this Error is because of a bug in one of the GCC files.
I just removed the -Werror flag and it compiled fully after changing all "\0" with 0. | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #4 on Tue 18 Sep 2018 05:55 AM (UTC) |
Message
| That flag just makes warnings become errors. They always were warnings, but with that flags it won’t let you compile them.
The idea behind that is the warnings are there for a reason, and you may find that even though it compiles you may have run time issues. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Ardentcrest
(47 posts) Bio
|
Date
| Reply #5 on Tue 18 Sep 2018 06:05 AM (UTC) Amended on Tue 18 Sep 2018 06:40 AM (UTC) by Ardentcrest
|
Message
| This is a confirmed bug of "snprintf" in GCC 7 and 8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80924
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78969
I believe Its just the warning coming up is the bug but the code should still work | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,495 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top