Author Topic: Undefined Variables Being Used  (Read 1320 times)

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
Undefined Variables Being Used
« on: May 08, 2004, 03:49:03 pm »
[chimp@arched ~/cvstuff/PSstuff/HEAD/planeshift]$ jam -aq
...patience...
...found 1352 target(s)...
...updating 277 target(s)...
MkDir1 ./out/linuxx86/debug/src/common/admin
C++ ./out/linuxx86/debug/src/common/admin/adminmessage.o
In file included from ./src/common/net/message.h:33,
                 from src/common/admin/adminmessage.h:25,
                 from src/common/admin/adminmessage.cpp:25:
./src/common/util/genqueue.h: In member function `bool GenericQueue::I
sFull()\':
./src/common/util/genqueue.h:87: error: `size\' undeclared (first use this functi
on)
./src/common/util/genqueue.h:87: error: (Each undeclared identifier is reported
only once for each function it appears in.)
In file included from ./src/common/util/genqueue.h:99,
                 from ./src/common/net/message.h:33,
                 from src/common/admin/adminmessage.h:25,
                 from src/common/admin/adminmessage.cpp:25:
./src/common/util/genqueue.cpp: In copy constructor `GenericQueue::Gen
ericQueue(GenericQueue&)\':
./src/common/util/genqueue.cpp:56: error: `others\' undeclared (first use this fu
nction)

    g++ -c -o ./out/linuxx86/debug/src/common/admin/adminmessage.o     -DCS_DEBU
G -g3 -I/home/chimp/cvstuff/PSstuff/HEAD/CS/include      -I/home/chimp/cvstuff/P
Sstuff/HEAD/cel/include -fexceptions  -I. -I./include -I./src/common -I./src/cli
ent -I./src/server src/common/admin/adminmessage.cpp

...failed C++ ./out/linuxx86/debug/src/common/admin/adminmessage.o ...
...skipped libpsadminnet.a for lack of libpsadminnet.a(adminmessage.o)...
...failed updating 1 target(s)...
...skipped 1 target(s)...
...updated 1 target(s)...

-------------------------------------------------------------------------

This happens for pretty much every other thing when I do just jam.

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #1 on: May 08, 2004, 03:57:55 pm »
These errors are caused by some misspelled variables.  Check the sources and you will find the solution. I don\'t have much time currently to help  you further, sorry :(


Back to Planeshift again \\o/

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #2 on: May 08, 2004, 04:53:29 pm »
What should I rename the vars to?

Androgos

  • Guest
(No subject)
« Reply #3 on: May 08, 2004, 06:01:16 pm »
That file hasn\'t been touched for 3 months.

Probably your compile is screwed or something

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #4 on: May 08, 2004, 06:24:42 pm »
Well, I am using gcc 3.4.0. Could that be a prob? And I have nVidia drivers.

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #5 on: May 08, 2004, 07:13:24 pm »
In src/common/util/genqueue.cpp:

Quote

template
bool GenericQueue::Add (queuetyp* msg)
{
    unsigned int tqend;

    csScopedMutexLock lock(mutex);  
    tqend = (qend + 1) % size; << change size here to qsize
    // check if queue is full
    if (tqend == qstart)
   return false;
     
    // add Message to queue
    qbuffer[qend]=msg;
    qend=tqend;

    datacondition->Signal ();

    return true;
}

template
GenericQueue::GenericQueue(GenericQueue& other)
{
    csScopedMutexLock lock(other.mutex);
   
    qsize = other.qsize;
    qbuffer = new queuetyp* [qsize];
    memcpy (qbuffer, other.qbuffer, qsize * sizeof(queuetyp*));
    if (!qbuffer)
    ERRORHALT (\"No Memory\");
    qstart = others.qstart; << change others here to other
    qend = others.qend; << here too

    mutex = csMutex::Create ();
    datacondition = csCondition::Create ();
}


in src/common/util/genqueue.h:

Quote

    bool IsFull()
    {
 return ((qend + 1) % size) == qstart; << change size to qsize here too
    }


that should to the trick


Back to Planeshift again \\o/