Re: circlebpl17-extended:missing file-strings.h part 2!!

From: Patrick Dughi (dughi@imaxx.net)
Date: 10/19/00


> ok i wrote this earlier today.....  I recently downloaded
> circlebpl17-extended and when i went to compile it(msvc6)it turns out
> that there was a missing file,strings.h?Anyone know where this file
> is?thanks and this was answered and i was told to look in my include so
> i did and found that their is no strings.h file along with a few others.
> i noticed that there is String.h and then just a plain String file with
> no extention. obviously string.h and strings.h are two completely
> different things.. if anyone has an answer to this i'd be very grateful.
> i'm going to try reinstalling msvc6 right now...hopefully that works.

        I can't vouch for anything someone else packaged, sometimes, not
even what I've packed up - so take this with a grain of salt.

        You're making the assumption that you're missing a file - either
in your compiler installation, or in your circlemud package.  This is most
likely not the case.  What you're doing (or not doing, rather) has to do
with code-level commands.

        In C, the actual functions are located in many places, depending
on the function.  Your circlemud, as it compiles, puts it's functions in
seperate .o (object) files, before it combines everything.  The standard
functions you use, like printf, or strcpy, they are in a file like that
too.  Most of the standard files are automatically included by your
compiler.  However - even though your compiler has access to the
functions, the compiler has to be told that it's using those functions in
each file that ...well... uses those functions.

        This is where the #include preprocessor command comes in.  It
tells the compiler to read in the listed file - usually this is a place
for structure and function declarations (prototyping).  There are two
types of # include,

#include "file.h"
        and
#include <file.h>

        The first says "grab the file based on the location of file I read
it out of" - in this case, file.h appears in the same directory as the
file we're compiling.  (A relative path).

        The second says "Grab the file based on the compiler
installation".  This is important, because this is where your string.h
file comes in.  If you want to use any of a great number of string (and
memory) related functions, you have to include the <string.h> file.  In
circlemud, this is defined for all files in the conf.h (..i think)
file, which is generated by configure for each given machine.

        The problem is compounded, because some compilers recoginize these
functions without having them declared, but still eventually require the
header (prototype) information.  Like msvc sometimes does.

        Makes it confusing to trace down errors sometimes.

        Anyway, what you have to do is either regenerate your conf.h (and
possible other) files, most easily by grabbing the conf.win type files
from a stock installation.  Then, if that fails, you'll have to go through
your code and add in all the correct include statements.

                                                PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT