Author Topic: Problem with psdatabase.cpp  (Read 1256 times)

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
Problem with psdatabase.cpp
« on: June 22, 2004, 05:19:52 pm »
src/server/psdatabase.cpp: In member function `virtual int
   psDatabase::InsertQuestEvent(char*, int)\':
src/server/psdatabase.cpp:2374: error: ambiguous overload for \'operator+\' in \'
   questName + spos\'
src/server/psdatabase.cpp:2374: error: candidates are: operator+(const char*,
   int)
/opt/CS/include/csutil/csstring.h:484: error:                 const csString&
   csString::operator+(const csString&) const
/opt/CS/include/csutil/csstring.h:519: error:                 csString
   operator+(const char*, const csString&)
/opt/CS/include/csutil/csstring.h:525: error:                 csString
   operator+(const csString&, const char*)

g++ -c -o ./out/linuxx86/psdatabase.o -I/opt/CS/include   -I/opt/cel/include -fe
xceptions  -Isrc/server -I. -I./include -I./src/common -I./src/client -I./src/se
rver src/server/psdatabase.cpp

...failed C++ ./out/linuxx86/psdatabase.o ...


^ Linux
« Last Edit: June 22, 2004, 05:23:31 pm by Psybur »

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #1 on: June 22, 2004, 07:44:18 pm »
CVS or MB?
Quidquid latine dictum sit, altum sonatur.

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #2 on: June 22, 2004, 09:21:22 pm »
I think you mean this line:
Quote

    temp.Append(questName + spos, epos-spos);

Change it into
Quote

    temp.Append((const char*) questName + (int) spos, epos-spos);


Back to Planeshift again \\o/

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #3 on: June 22, 2004, 10:18:38 pm »
LinkApplication psserver
./out/linuxx86/libpsutil.a(pserror.o)(.text+0x2e): In function `errorhalt(char c
onst*, char const*, int, char const*)\':
: multiple definition of `errorhalt(char const*, char const*, int, char const*)\'
./out/linuxx86/error.o(.text+0x0): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: W
arning: size of symbol `errorhalt(char const*, char const*, int, char const*)\' c
hanged from 250 in ./out/linuxx86/error.o to 72 in ./out/linuxx86/libpsutil.a(ps
error.o)
./out/linuxx86/libpsutil.a(pserror.o)(.text+0x76): In function `errormsg(char co
nst*, char const*, int, char const*)\':
: multiple definition of `errormsg(char const*, char const*, int, char const*)\'
./out/linuxx86/error.o(.text+0xfa): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: W
arning: size of symbol `errormsg(char const*, char const*, int, char const*)\' ch
anged from 5 in ./out/linuxx86/error.o to 60 in ./out/linuxx86/libpsutil.a(pserr
or.o)
./out/linuxx86/libpsbehave.a(psbehave.o)(.text+0x1170): In function `psBehaviour
Actor::SendMessageV(char const*, iBase*, char*)\':
: undefined reference to `CmdHandler::Publish(char const*)\'
./out/linuxx86/libpsbehave.a(psbehave.o)(.text+0x12ce): In function `psBehaviour
Actor::SendMessageV(char const*, iBase*, char*)\':
: undefined reference to `CmdHandler::Publish(char const*)\'
collect2: ld returned 1 exit status

  g++ -o psserver ./out/linuxx86/psserverdr.o ./out/linuxx86/weathermanager.o ./
out/linuxx86/guildmanager.o ./out/linuxx86/command.o ./out/linuxx86/psserver.o .
/out/linuxx86/authentserver.o ./out/linuxx86/psdatabase.o ./out/linuxx86/chatman
ager.o ./out/linuxx86/main.o ./out/linuxx86/clients.o ./out/linuxx86/netthread.o
 ./out/linuxx86/adminmanager.o ./out/linuxx86/spawnmanager.o ./out/linuxx86/psce
lserver.o ./out/linuxx86/psserverchar.o ./out/linuxx86/client.o ./out/linuxx86/u
sermanager.o ./out/linuxx86/combatmanager.o ./out/linuxx86/psserverbehave.o ./ou
t/linuxx86/serverstatus.o ./out/linuxx86/error.o ./out/linuxx86/libpsnet.a ./out
/linuxx86/libpsengine.a ./out/linuxx86/libpsutil.a ./out/linuxx86/libpsbehave.a
./out/linuxx86/libpsrpgrules.a ./out/linuxx86/libpsadminnet.a -L/opt/CS/./out/li
nuxx86/optimize/libs/cssys -L/opt/CS/./out/linuxx86/optimize/libs/csutil -L/opt/
CS/./out/linuxx86/optimize/libs/cstool -L/opt/CS/./out/linuxx86/optimize/libs/cs
engine -L/opt/CS/./out/linuxx86/optimize/libs/csgfx -L/opt/CS/./out/linuxx86/opt
imize/libs/csgeom -L/opt/CS/./out/linuxx86/optimize/libs/csws -lcstool -lcsgfx -
lcsgeom  -lcsutil -lcssys -lcsgeom -lcsutil  -lm -ldl -lnsl -lpthread

...failed LinkApplication psserver ...

GRR

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #4 on: June 22, 2004, 10:58:55 pm »
Comment out the errorhalt() and errormsg() functions in error.cpp and execute
jam -a server


Back to Planeshift again \\o/

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #5 on: June 23, 2004, 03:20:31 pm »
LinkApplication psserver
./out/linuxx86/libpsbehave.a(psbehave.o)(.text+0x1170): In function `psBehaviour
Actor::SendMessageV(char const*, iBase*, char*)\':
: undefined reference to `CmdHandler::Publish(char const*)\'
./out/linuxx86/libpsbehave.a(psbehave.o)(.text+0x12ce): In function `psBehaviour
Actor::SendMessageV(char const*, iBase*, char*)\':
: undefined reference to `CmdHandler::Publish(char const*)\'
collect2: ld returned 1 exit status

  g++ -o psserver ./out/linuxx86/psserverdr.o ./out/linuxx86/weathermanager.o ./
out/linuxx86/guildmanager.o ./out/linuxx86/command.o ./out/linuxx86/psserver.o .
/out/linuxx86/authentserver.o ./out/linuxx86/psdatabase.o ./out/linuxx86/chatman
ager.o ./out/linuxx86/main.o ./out/linuxx86/clients.o ./out/linuxx86/netthread.o
 ./out/linuxx86/adminmanager.o ./out/linuxx86/spawnmanager.o ./out/linuxx86/psce
lserver.o ./out/linuxx86/psserverchar.o ./out/linuxx86/client.o ./out/linuxx86/u
sermanager.o ./out/linuxx86/combatmanager.o ./out/linuxx86/psserverbehave.o ./ou
t/linuxx86/serverstatus.o ./out/linuxx86/error.o ./out/linuxx86/libpsnet.a ./out
/linuxx86/libpsengine.a ./out/linuxx86/libpsutil.a ./out/linuxx86/libpsbehave.a
./out/linuxx86/libpsrpgrules.a ./out/linuxx86/libpsadminnet.a -L/opt/CS/./out/li
nuxx86/optimize/libs/cssys -L/opt/CS/./out/linuxx86/optimize/libs/csutil -L/opt/
CS/./out/linuxx86/optimize/libs/cstool -L/opt/CS/./out/linuxx86/optimize/libs/cs
engine -L/opt/CS/./out/linuxx86/optimize/libs/csgfx -L/opt/CS/./out/linuxx86/opt
imize/libs/csgeom -L/opt/CS/./out/linuxx86/optimize/libs/csws -lcstool -lcsgfx -
lcsgeom  -lcsutil -lcssys -lcsgeom -lcsutil  -lm -ldl -lnsl -lpthread

...failed LinkApplication psserver ...
« Last Edit: June 23, 2004, 03:20:50 pm by Psybur »

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #6 on: June 23, 2004, 08:33:32 pm »
In src/common/psbehave/psbehave.h:
change
Quote

 #include

to
Quote

 #include
 #include \"net/msghandler.h\"

and again:
jam -a server


Back to Planeshift again \\o/

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #7 on: June 23, 2004, 10:06:03 pm »
I cannot find these includes in the .h file.

I added them to the .h and .cpp file, still the same error.

Also, I see char const*... shouldnt it be const *char?
« Last Edit: June 23, 2004, 10:19:14 pm by Psybur »

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #8 on: June 23, 2004, 10:25:08 pm »
here is the beginning of the psbehave.h file:
Quote

/*
 * psbehave.h - author Matze Braun
 *
 * Copyright (C) 2001 PlaneShift Team (info@planeshift.it,
 * http://www.planeshift.it)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation (version 2 of the License)
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
#ifndef __PSBEHAVE_H__
#define __PSBEHAVE_H__

#include
#include

#include
#include
#include \"net/msghandler.h\"

struct iCelEntity;
struct iObjectRegistry;
class psRaceDefinition;
class csVector3;




Back to Planeshift again \\o/

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #9 on: June 23, 2004, 10:31:09 pm »
Still the same... maybe I should get a new psbehave.cpp

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #10 on: June 23, 2004, 10:32:08 pm »
Are you guys fixing some root problem or just trying to cure the symptoms?
Quidquid latine dictum sit, altum sonatur.

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #11 on: June 23, 2004, 10:35:39 pm »
Hmm... do you have Aineko\'s mods applied, Psybur? Because I have.

And what do you mean, dfryer? I have already a running server, I just try to help Psybur to get his one running.


Back to Planeshift again \\o/

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #12 on: June 23, 2004, 10:58:59 pm »
I just got a new fresh psbehave.cpp from CVS. I will apply aineko\'s mods now.

Psybur

  • Hydlaa Resident
  • *
  • Posts: 165
    • View Profile
(No subject)
« Reply #13 on: June 23, 2004, 11:06:56 pm »
planeshift.application.server: No iConnection plugin!

I probably just have to recompile CS now that I installed mysql D:

Nope, no dice.
« Last Edit: June 23, 2004, 11:25:56 pm by Psybur »

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #14 on: June 23, 2004, 11:20:15 pm »
Nope, you have to patch the PS configure script. Change all lines with

mysql_connect(0,0,0,0);
to
mysql_real_connect(0,0,0,0,0,0,0,0);

Then libmysql will be found by configure and dbmysql.so will compile
« Last Edit: June 23, 2004, 11:22:28 pm by Karosh_Steinkatz »


Back to Planeshift again \\o/