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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ warnings
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Gorock
(149 posts) Bio
|
| Date
| Fri 28 Oct 2005 10:33 PM (UTC) |
| Message
| how do i make it where warnings are not treated like errors
because i am trying to compile but get this
Compiling o/mccp.o....
cc1: warnings being treated as errors
mccp.c: In function `process_compressed':
mccp.c:65: warning: implicit declaration of function `write'
make[1]: *** [o/mccp.o] Error 1
make: *** [all] Error 2
can i toggle that or anything | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Fri 28 Oct 2005 11:02 PM (UTC) |
| Message
| Naturally. Try "man gcc" and search the rather lengthy list of options. In particular:
-Werror
Make all warnings into errors.
You need to take that out of your makefile. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Gorock
(149 posts) Bio
|
| Date
| Reply #2 on Fri 28 Oct 2005 11:04 PM (UTC) |
| Message
| | ok after that how would i fix this warning? | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #3 on Sat 29 Oct 2005 01:02 AM (UTC) |
| Message
| | Looks like you forgot an include or something. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #4 on Sat 29 Oct 2005 10:53 PM (UTC) |
| Message
| | By consulting "man write" ( you may need to try "man 3 write" ) and seeing which includes it lists as required in the page that discusses the function. This method will work for most glibc library code. | | Top |
|
| Posted by
| Gorock
(149 posts) Bio
|
| Date
| Reply #5 on Sun 30 Oct 2005 04:09 PM (UTC) |
| Message
| | ok i did man 3 write it said No entry for write in section 3 of the manual so then i did man write to read it but it was talking about write is used to send messages to a terminal like echoing messages is this what you were talking about | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #6 on Sun 30 Oct 2005 07:42 PM (UTC) |
| Message
| | Well ok, so in this case it was "man 2 write" :) | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #7 on Sun 30 Oct 2005 09:24 PM (UTC) |
| Message
| In case you don't find it, here are the first few lines:
NAME
write - write to a file descriptor
SYNOPSIS
#include <unistd.h>
ssize_t write(int fd, const void *buf, size_t count);
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Gorock
(149 posts) Bio
|
| Date
| Reply #8 on Sun 30 Oct 2005 10:37 PM (UTC) |
| Message
| | ok i put the include in and it worked just out of curiosity how would i know what include to put in later is there a list of them somewhere or a reference guide or something | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #9 on Mon 31 Oct 2005 12:35 AM (UTC) |
| Message
| | As Nick showed, the required include files will be noted in the manual of what you're using. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Gorock
(149 posts) Bio
|
| Date
| Reply #10 on Mon 31 Oct 2005 01:49 AM (UTC) |
| Message
| | ok but i mean how did he know to type man -2 and all that i didn;t understand | | Top |
|
| Posted by
| Samson
USA (683 posts) Bio
|
| Date
| Reply #11 on Tue 01 Nov 2005 03:17 AM (UTC) |
| Message
| | It was sort of a lucky guess on my part the first time I tried something like "man 2 write". I had noted that at the bottom of a man page I was looking at that some of the listings had (1) or (3) after them. So I figured I'd find out what using those would do for me and found what I was after :) | | 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.
36,659 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top