#44 undefined variables and broken Video* in building

GemRB Main Engine
closed-works-for-me
nobody
None
5
2005-04-09
2005-04-05
Seegras
No

After automake; aclocal and setup.sh, make tries to
build and stumbles.

if /bin/sh ../../../libtool --tag=CXX --mode=compile
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include
-DSYSCONFDIR=\"/opt/Games/BaldursGate2/etc\"
-DDATADIR=\"/opt/Games/BaldursGate2/gemrb\"
-DPLUGINDIR=\"/opt/Games/BaldursGate2/plugins/gemrb\"
-g -O2 -I/usr/include/SDL -D_REENTRANT -Werror -Wall -W
-Wpointer-arith -Wcast-align -ansi -pedantic
-Wno-format-y2k -Wno-long-long -MT Interface.lo -MD -MP
-MF ".deps/Interface.Tpo" -c -o Interface.lo
Interface.cpp; \ then mv -f ".deps/Interface.Tpo" ".deps/Interface.Plo";
else rm -f ".deps/Interface.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include
-DSYSCONFDIR=\"/opt/Games/BaldursGate2/etc\"
-DDATADIR=\"/opt/Games/BaldursGate2/gemrb\"
-DPLUGINDIR=\"/opt/Games/BaldursGate2/plugins/gemrb\"
-g -O2 -I/usr/include/SDL -D_REENTRANT -Werror -Wall -W
-Wpointer-arith -Wcast-align -ansi -pedantic
-Wno-format-y2k -Wno-long-long -MT Interface.lo -MD -MP
-MF .deps/Interface.Tpo -c Interface.cpp -fPIC -DPIC
-o .libs/Interface.o

Interface.cpp: In constructor
`Interface::Interface(int, char**)':
Interface.cpp:72: error: parse error before `<<' token
Interface.cpp:74: error: `GEMRB_RELEASE' undeclared
(first use this function)
Interface.cpp:74: error: (Each undeclared identifier is
reported only once for
each function it appears in.)
Interface.cpp:74: error: `GEMRB_API_NUM' undeclared
(first use this function)
Interface.cpp:74: error: `GEMRB_SDK_REV' undeclared
(first use this function)
Interface.cpp:75: error: cannot convert `const char[4]'
to `Video*' in
assignment
Interface.cpp:76: error: parse error before `==' token
Interface.cpp:80: error: parse error before `>>' token

GEMRB_RELEASE, GEMRB_API_NUM and GEMRB_SDK_REV really
seem to be defined nowhere in the whole source-tree.

But worse is that conversion. What is this really
supposed to be?

Platform is Linux/Debian. automake 2.50, autoconf 1.7

Discussion

  • Seegras
    Seegras
    2005-04-08

    Logged In: YES
    user_id=1253615

    Ugly hack, add the following to Interface.cpp:

    #ifndef GEMRB_RELEASE

    #define GEMRB_RELEASE 2;

    #define GEMRB_API_NUM 9;

    #define GEMRB_SDK_REV 2;

    #endif

    And change
    video = "SDL";
    to
    video = (Video*)"SDL";

    Remove those >>>>>> and one set of assignments in between..
    Is this C++-specific? Ugly. Now I know why I only program C ;))

    At least this compiles now. Until the next error:

    NullSnd.h:33: error: conflicting return type specified for
    `virtual long
    unsigned int NullSnd::StreamFile(const char*)'
    ../Core/SoundMgr.h:51: error: overriding `virtual unsigned
    int
    SoundMgr::StreamFile(const char*)'
    NullSoundCD.cpp:35: error: cannot allocate an object of type
    `NullSnd'
    NullSoundCD.cpp:35: error: because the following virtual
    functions are
    abstract:
    ../Core/SoundMgr.h:50: error: virtual unsigned int
    SoundMgr::Play(const char*,
    int, int, unsigned int)
    ../Core/SoundMgr.h:54: error: virtual bool SoundMgr::CanPlay()

     
  • Laszlo Toth
    Laszlo Toth
    2005-04-09

    Logged In: YES
    user_id=885460

    The >>>>> marks are coming from a CVS conflict, they are not
    in the original source.
    There is no Video = "SDL" line in our code :)
    Either you are not using our current CVS, or made some
    changes before upgrade.
    In case that nonsense came from the tarballs, i apologize,
    but posting a release on SF is a bit inconvenient at this time.
    If you are using the tarballs then i suggest switching to
    the public CVS.

     
  • Laszlo Toth
    Laszlo Toth
    2005-04-09

    • status: open --> closed-works-for-me
     
  • Seegras
    Seegras
    2005-04-10

    Logged In: YES
    user_id=1253615

    From cvs. I did a fresh checkout. Problems solved.