[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  warnings

warnings

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Gorock   (149 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] bio
Date Reply #2 on Fri 28 Oct 2005 11:04 PM (UTC)
Message
ok after that how would i fix this warning?
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] 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
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] 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.
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] 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
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] 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" :)
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] 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
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] 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
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] 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
[Go to top] top

Posted by Gorock   (149 posts)  [Biography] 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
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] 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 :)
[Go to top] 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.


24,950 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]