Discussions about interactive fiction

Inform 7 Source Code unbuildable?

Lately I’ve been wanting to learn about how Inform 7 works, so I’ve
downloaded the source code. Unfortunately I ran into a few
problems . . .

First, I tried to compile the code using Visual C++ 2008 Express
Edition – after all, there’s no point in looking at source code with a
bazillion errors showing up – and after converting the code from 2003
to 2008, I found I couldn’t; the source was missing some MFC files,
but since I have Visual Studio 2005 Professional (which comes with MFC
support), I instead scrapped the 2008 stuff and used 2005. It was
again missing some files, but this time I knew exactly where and what
they were, so it didn’t take long to help VS find them. After that, I
landed myself with 60+ errors – a few I have fixed (they were simple
enough, just bad type conversions), but the rest are a mystery (I
don’t actually know C++, but I have an inking of what C++ code does
and looks like). So to cut a long story short, is it possible at all
to compile the I7 source? If so, are there any requirements I’d need
(aside from rewriting half the code or getting a non-freeware
compiler)?

.
posted by admin in Uncategorized and have Comments (5)

5 Responses to “Inform 7 Source Code unbuildable?”

  1. admin says:

    On Dec 31, 6:13 pm, JDC <jd…@psu.edu> wrote:

    > I don’t know anything about building the source (not using Windows),
    > but I should point out that the source that is currently available is
    > only for the IDE application; the source for the underlying CLI tools
    > (the I7 compiler, e.g.) is not available (at least yet). So:
    > (a) This may not give you the sort of information about Inform 7 that
    > you’re interested in.
    > (b) You may need to link in the executables for the underlying tools
    > somehow in order to build, since the source for them isn’t part of the
    > package (just guessing here on this part).

    > -JDC

    WARNING: THIS POST IS LONG BECAUSE OF 63 C++ ERRORS BEING LISTED

    Now that that’s out of the way, I guess you’d be mostly right about
    a), since the app is by itself and while I’d like to learn more about
    the Windows API and how it’s used in I7 (assuming I7 uses it, though I
    don’t see why it wouldn’t), I’m more interested in learning how
    compilers work because I’d like to someday write my own (maybe for an
    IF IDE of my own even). With b), although C++ error reporting to me is
    hard to understand, I’m not sure the errors were related to not having
    the compilers there, but if you’re interested here are the errors (all
    63 of them, and this is for 5J39):

    Error   2       error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  66
    Error   3       error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      66
    Error   4       error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  67
    Error   5       error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      67
    Error   6       error C2378: ‘JSAMPROW’ : redefinition; symbol cannot be
    overloaded with a typedef       c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      67
    Error   7       error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      67
    Error   8       error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  68
    Error   9       error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      68
    Error   10      error C2378: ‘JSAMPARRAY’ : redefinition; symbol cannot be
    overloaded with a typedef       c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      68
    Error   11      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      68
    Error   12      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  71
    Error   13      error C2040: ‘FAR’ : ‘JBLOCK’ differs in levels of
    indirection from ‘JSAMPLE’      c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      71
    Error   14      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      71
    Error   15      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  72
    Error   16      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      72
    Error   17      error C2378: ‘JBLOCKROW’ : redefinition; symbol cannot be
    overloaded with a typedef       c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      72
    Error   18      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      72
    Error   19      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  73
    Error   20      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      73
    Error   21      error C2378: ‘JBLOCKARRAY’ : redefinition; symbol cannot be
    overloaded with a typedef       c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      73
    Error   22      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      73
    Error   23      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  75
    Error   24      error C2371: ‘FAR’ : redefinition; different basic types        c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  75
    Error   25      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      75
    Error   26      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  193
    Error   27      error C2371: ‘FAR’ : redefinition; different basic types        c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  193
    Error   28      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      193
    Error   29      error C2146: syntax error : missing ‘;’ before identifier
    ‘next’  c:\Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  196
    Error   30      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      196
    Error   31      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      196
    Error   32      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  200
    Error   33      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      200
    Error   34      error C2146: syntax error : missing ‘;’ before identifier
    ‘colormap’      c:\Documents and Settings\Mason Cox\My Documents\Visual
    Studio 2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h   479
    Error   35      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      479
    Error   36      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      479
    Error   37      error C2146: syntax error : missing ‘;’ before identifier
    ‘marker_list’   c:\Documents and Settings\Mason Cox\My Documents\Visual
    Studio 2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h   566
    Error   38      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      566
    Error   39      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      566
    Error   40      error C2143: syntax error : missing ‘;’ before ‘*’      c:
    \Documents and Settings\Mason Cox\My Documents\Visual Studio
    2005\Projects\Inform 7 Source\Libraries\jpeg\jpeglib.h  761
    Error   41      error C2182: ‘FAR’ : illegal use of type ‘void’ c:\Documents
    and Settings\Mason Cox\My Documents\Visual Studio 2005\Projects\Inform
    7 Source\Libraries\jpeg\jpeglib.h       761
    Error   42      error C4430: missing type specifier – int assumed. Note: C++
    does not support default-int    c:\Documents and Settings\Mason Cox\My
    Documents\Visual Studio 2005\Projects\Inform 7 Source\Libraries\jpeg
    \jpeglib.h      761
    Error   43      error C2059: syntax error : ‘*’ c:\Documents and Settings
    \Mason Cox\My Documents\Visual Studio 2005\Projects\Inform 7 Source
    \Libraries\jpeg\jpeglib.h       764
    Error   44      error C2091: function returns function  c:\Documents and
    Settings\Mason

    read more »

  2. admin says:

    On Dec 31, 2:47 am, Mason Cox <mason….@bigpond.com> wrote:
    [...]

    > Now that that’s out of the way, I guess you’d be mostly right about
    > a), since the app is by itself and while I’d like to learn more about
    > the Windows API and how it’s used in I7 (assuming I7 uses it, though I
    > don’t see why it wouldn’t), I’m more interested in learning how
    > compilers work because I’d like to someday write my own (maybe for an
    > IF IDE of my own even). With b), although C++ error reporting to me is
    > hard to understand, I’m not sure the errors were related to not having
    > the compilers there, but if you’re interested here are the errors (all
    > 63 of them, and this is for 5J39):

    I’m not sure what to do about those errors, but if you’re interested
    in how compilers work, you might want to start by looking at the
    Inform 6 source instead:

    http://mirror.ifarchive.org/indexes/if-archiveXinfocomXcompilersXinfo

    Even if the Inform 7 compiler source were available, Inform 6 is still
    a more conventional compiler (producing binary code instead of
    translating to another form of source) for a more conventional
    language (rigid syntax instead of contextual semantic magic), and
    compiling it is simple and straightforward. Just make a new VS
    project, add all the files to it, edit header.h to make sure it’s
    configured for Windows, and build the project.

    vw

  3. admin says:

    it seems the original one was build using visual studio 2007.

  4. admin says:

    In article <2a7a4a27-2631-41ec-b4b6-e7ff2f9ec…@i29g2000prf.googlegroups.com>,

    - Hide quoted text — Show quoted text -

    vaporware  <jmcg…@gmail.com> wrote:
    >On Dec 31, 2:47 am, Mason Cox <mason….@bigpond.com> wrote:
    >[...]
    >> Now that that’s out of the way, I guess you’d be mostly right about
    >> a), since the app is by itself and while I’d like to learn more about
    >> the Windows API and how it’s used in I7 (assuming I7 uses it, though I
    >> don’t see why it wouldn’t), I’m more interested in learning how
    >> compilers work because I’d like to someday write my own (maybe for an
    >> IF IDE of my own even). With b), although C++ error reporting to me is
    >> hard to understand, I’m not sure the errors were related to not having
    >> the compilers there, but if you’re interested here are the errors (all
    >> 63 of them, and this is for 5J39):

    >I’m not sure what to do about those errors, but if you’re interested
    >in how compilers work, you might want to start by looking at the
    >Inform 6 source instead:

    If you’re interested in how compilers work, read the Dragon Book (Aho,
    Sethi, et al.).

    Or you could wait until 2010 when Volume 5 of Knuth’s _Art_ is promised,
    on the very topic.  But don’t hold your breath.

    Adam

  5. admin says:

    On Dec 31, 8:55 am, a…@fsf.net (Adam Thornton) wrote:

    > Or you could wait until 2010 when Volume 5 of Knuth’s _Art_ is promised,
    > on the very topic.  But don’t hold your breath.

    Actually, it’s been postponed til 2015.    :-)

    And Cox, don’t let it trouble you that Knuth will turn 70 in about a
    week.   It’s a minor bug.

Place your comment

You must be logged in to post a comment.