Author Topic: msvc10 client build errors  (Read 1728 times)

Cron

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
msvc10 client build errors
« on: July 02, 2010, 08:56:12 pm »
Dear friends,
I am trying to build the ps client by following this guide : http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/docs/compiling.html
(Using this selection : Windows - MSVC - user - normal)
Am using ms studio c++ express 2010 to build with.
cs build (with msvc10 version) was error free and the walktest.exe test app works fine.
I used this ps project version : mk\msvc10\wkspstypical.sln
When I build just the apppsclient project I get the following linker errors:

------ Build started: Project: apppsclient, Configuration: Release (with DLLs) Win32 ------
pscelclient.obj : error LNK2001: unresolved external symbol "public: class CalMixer * __thiscall CalModel::getMixer(void)const " (?getMixer@CalModel@@QBEPAVCalMixer@@XZ)
pscelclient.obj : error LNK2001: unresolved external symbol "public: class CalCoreModel * __thiscall CalModel::getCoreModel(void)const " (?getCoreModel@CalModel@@QBEPAVCalCoreModel@@XZ)
pscelclient.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CalMixer::removeAction(int)" (?removeAction@CalMixer@@QAE_NH@Z)
pscelclient.obj : error LNK2001: unresolved external symbol "public: class CalCoreAnimation * __thiscall CalCoreModel::getCoreAnimation(int)" (?getCoreAnimation@CalCoreModel@@QAEPAVCalCoreAnimation@@H@Z)
pscelclient.obj : error LNK2001: unresolved external symbol "public: float __thiscall CalCoreAnimation::getDuration(void)const " (?getDuration@CalCoreAnimation@@QBEMXZ)
..\..\psclient.exe : fatal error LNK1120: 5 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Can you please advise how to solve these errors ?

I was wondering if pscelclient has something to do with CEL, since there is no CEL information in the current build guide, but it was in earlier guides.
Is it not required any more ?
Also compatible version of cal3d is mentioned but there is not further info about downloading or building it ?

I tried first in the irc channel #planeshift-build but did not get any response there.

Rgds, Cron.

Illysia

  • Forum Addict
  • *
  • Posts: 2774
    • View Profile
Re: msvc10 client build errors
« Reply #1 on: July 02, 2010, 10:41:12 pm »
I know nothing about compiling, but I believe there is also a guide on the forums and that might help some.

Rando

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: msvc10 client build errors
« Reply #2 on: August 17, 2010, 04:21:18 pm »
I had similar problems in 2010, however, the libraries in which there were unresolved externs weren't Cal related.  I don't know if the guide is missing a step or if the lib path details are different in 2010 (I believe this is probably the case).

FYI:
I'm running Windows 7 64-bit, not that it should make a difference.

RlyDontKnow

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 403
    • View Profile
Re: msvc10 client build errors
« Reply #3 on: August 17, 2010, 05:53:14 pm »
could you retry with latest head? the project files were regenerated with latest changes just lately

Rando

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: msvc10 client build errors
« Reply #4 on: August 17, 2010, 07:56:34 pm »
With the latest head, I still get the link errors in 2010 and 2005.  (Updated from repository @ 7:56 CST)

RlyDontKnow

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 403
    • View Profile
Re: msvc10 client build errors
« Reply #5 on: August 18, 2010, 04:24:20 am »
did you add the cs winlibs directory to your library directories? (cs/winlibs/x86 or cs/winlibs/x64 iirc)

Rando

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: msvc10 client build errors
« Reply #6 on: August 18, 2010, 06:02:46 am »
I did. 

For dal.obj, there are many _mysql_* symbols symbols unresolved.  I added the mysql library path to the project, as well as copying the libmysql.dll to the ps directory. 

In libpsrpgrules.lib, a pslog::LogMessage(...) is undefined.

Any idea where these symbols are defined that I may not have included?

The link errors I get are as follows(This is in 2005, as I have many more problems in 2010):

Error   1   error LNK2019: unresolved external symbol _mysql_close@4 referenced in function "public: virtual __thiscall psMysqlConnection::~psMysqlConnection(void)" (??1psMysqlConnection@@UAE@XZ)   dal.obj   
Error   2   error LNK2019: unresolved external symbol _mysql_options@12 referenced in function "public: virtual bool __thiscall psMysqlConnection::Initialize(char const *,unsigned int,char const *,char const *,char const *,class LogCSV *)" (?Initialize@psMysqlConnection@@UAE_NPBDI000PAVLogCSV@@@Z)   dal.obj   
Error   3   error LNK2019: unresolved external symbol _mysql_real_connect@32 referenced in function "public: virtual bool __thiscall psMysqlConnection::Initialize(char const *,unsigned int,char const *,char const *,char const *,class LogCSV *)" (?Initialize@psMysqlConnection@@UAE_NPBDI000PAVLogCSV@@@Z)   dal.obj   
Error   4   error LNK2019: unresolved external symbol _mysql_init@4 referenced in function "public: virtual bool __thiscall psMysqlConnection::Initialize(char const *,unsigned int,char const *,char const *,char const *,class LogCSV *)" (?Initialize@psMysqlConnection@@UAE_NPBDI000PAVLogCSV@@@Z)   dal.obj   
Error   5   error LNK2019: unresolved external symbol _mysql_thread_init@0 referenced in function "public: virtual bool __thiscall psMysqlConnection::Initialize(char const *,unsigned int,char const *,char const *,char const *,class LogCSV *)" (?Initialize@psMysqlConnection@@UAE_NPBDI000PAVLogCSV@@@Z)   dal.obj   
Error   6   error LNK2019: unresolved external symbol _mysql_server_init@12 referenced in function "public: virtual bool __thiscall psMysqlConnection::Initialize(char const *,unsigned int,char const *,char const *,char const *,class LogCSV *)" (?Initialize@psMysqlConnection@@UAE_NPBDI000PAVLogCSV@@@Z)   dal.obj   
Error   7   error LNK2019: unresolved external symbol _mysql_server_end@0 referenced in function "public: virtual bool __thiscall psMysqlConnection::Close(void)" (?Close@psMysqlConnection@@UAE_NXZ)   dal.obj   
Error   8   error LNK2019: unresolved external symbol _mysql_error@4 referenced in function "public: virtual char const * __thiscall psMysqlConnection::GetLastError(void)" (?GetLastError@psMysqlConnection@@UAEPBDXZ)   dal.obj   
Error   9   error LNK2019: unresolved external symbol _mysql_escape_string@12 referenced in function "public: virtual void __thiscall psMysqlConnection::Escape(class csString &,char const *)" (?Escape@psMysqlConnection@@UAEXAAVcsString@@PBD@Z)   dal.obj   
Error   10   error LNK2019: unresolved external symbol _mysql_affected_rows@4 referenced in function "public: virtual unsigned long __cdecl psMysqlConnection::CommandPump(char const *,...)" (?CommandPump@psMysqlConnection@@UAAKPBDZZ)   dal.obj   
Error   11   error LNK2019: unresolved external symbol _mysql_query@8 referenced in function "public: virtual unsigned long __cdecl psMysqlConnection::CommandPump(char const *,...)" (?CommandPump@psMysqlConnection@@UAAKPBDZZ)   dal.obj   
Error   12   error LNK2019: unresolved external symbol _mysql_insert_id@4 referenced in function "public: virtual unsigned __int64 __thiscall psMysqlConnection::GetLastInsertID(void)" (?GetLastInsertID@psMysqlConnection@@UAE_KXZ)   dal.obj   
Error   13   error LNK2019: unresolved external symbol _mysql_stmt_init@4 referenced in function "public: __thiscall dbRecord::dbRecord(struct st_mysql *,char const *,char const *,unsigned int,class LogCSV *,char const *,unsigned int)" (??0dbRecord@@QAE@PAUst_mysql@@PBD1IPAVLogCSV@@1I@Z)   dal.obj   
Error   14   error LNK2019: unresolved external symbol _mysql_stmt_close@4 referenced in function "public: virtual __thiscall dbRecord::~dbRecord(void)" (??1dbRecord@@UAE@XZ)   dal.obj   
Error   15   error LNK2019: unresolved external symbol _mysql_num_fields@4 referenced in function "public: __thiscall psResultSet::psResultSet(struct st_mysql *)" (??0psResultSet@@QAE@PAUst_mysql@@@Z)   dal.obj   
Error   16   error LNK2019: unresolved external symbol _mysql_num_rows@4 referenced in function "public: __thiscall psResultSet::psResultSet(struct st_mysql *)" (??0psResultSet@@QAE@PAUst_mysql@@@Z)   dal.obj   
Error   17   error LNK2019: unresolved external symbol _mysql_store_result@4 referenced in function "public: __thiscall psResultSet::psResultSet(struct st_mysql *)" (??0psResultSet@@QAE@PAUst_mysql@@@Z)   dal.obj   
Error   18   error LNK2019: unresolved external symbol _mysql_free_result@4 referenced in function "public: virtual __thiscall psResultSet::~psResultSet(void)" (??1psResultSet@@UAE@XZ)   dal.obj   
Error   19   error LNK2019: unresolved external symbol _mysql_fetch_row@4 referenced in function "public: virtual int __thiscall psResultRow::Fetch(int)" (?Fetch@psResultRow@@UAEHH@Z)   dal.obj   
Error   20   error LNK2019: unresolved external symbol _mysql_data_seek@12 referenced in function "public: virtual int __thiscall psResultRow::Fetch(int)" (?Fetch@psResultRow@@UAEHH@Z)   dal.obj   
Error   21   error LNK2019: unresolved external symbol _mysql_field_seek@8 referenced in function "public: virtual char const * __thiscall psResultRow::operator[](char const *)" (??ApsResultRow@@UAEPBDPBD@Z)   dal.obj   
Error   22   error LNK2019: unresolved external symbol _mysql_fetch_field@4 referenced in function "public: virtual char const * __thiscall psResultRow::operator[](char const *)" (??ApsResultRow@@UAEPBDPBD@Z)   dal.obj   
Error   23   error LNK2019: unresolved external symbol _mysql_stmt_execute@4 referenced in function "public: virtual bool __thiscall dbRecord::Execute(unsigned int)" (?Execute@dbRecord@@UAE_NI@Z)   dal.obj   
Error   24   error LNK2019: unresolved external symbol _mysql_stmt_bind_param@8 referenced in function "public: virtual bool __thiscall dbRecord::Execute(unsigned int)" (?Execute@dbRecord@@UAE_NI@Z)   dal.obj   
Error   25   error LNK2019: unresolved external symbol _mysql_stmt_param_count@4 referenced in function "public: virtual bool __thiscall dbRecord::Execute(unsigned int)" (?Execute@dbRecord@@UAE_NI@Z)   dal.obj   
Error   26   error LNK2019: unresolved external symbol _mysql_stmt_prepare@12 referenced in function "public: virtual bool __thiscall dbInsert::Prepare(void)" (?Prepare@dbInsert@@UAE_NXZ)   dal.obj   
Error   27   fatal error LNK1120: 26 unresolved externals   ..\..\dbmysql.dll   
Error   28   error LNK2019: unresolved external symbol "void __cdecl pslog::LogMessage(char const *,int,char const *,int,enum LOG_TYPES,unsigned int,char const *,...)" (?LogMessage@pslog@@YAXPBDH0HW4LOG_TYPES@@I0ZZ) referenced in function "public: class psMoney __thiscall psMoney::operator-(class psMoney const &)const " (??GpsMoney@@QBE?AV0@ABV0@@Z)   libpsrpgrules_d.lib   
Error   29   fatal error LNK1120: 1 unresolved externals   ..\..\testrpgrules.exe   



weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: msvc10 client build errors
« Reply #7 on: August 18, 2010, 06:08:08 am »
testrpgrules doesn't matter. for mysql you are 100% using the wrong lib (32bit vs 64bit) or didn't declare correctly the position of the lib file. the lib files in windows are the declaration of what's inside a dynamically linked library, dll files are useless at build time and useful only at runtime

Rando

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: msvc10 client build errors
« Reply #8 on: August 18, 2010, 07:22:44 am »
Thank you for the info.  When I get home from work I will look into this.  A stupid question:  I am running 64-bit windows, dows this mean I need the 64-bit library?  Or can I still build for 32-bit target with the 32-bit libraries?

RlyDontKnow

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 403
    • View Profile
Re: msvc10 client build errors
« Reply #9 on: August 18, 2010, 05:00:54 pm »
you can still build the 32bit target with 32bit libs, it just has to be coherent, 32bit target and 32bit libs or 64bit target and 64bit libs

Rando

  • Wayfarer
  • *
  • Posts: 7
    • View Profile
Re: msvc10 client build errors
« Reply #10 on: August 19, 2010, 01:05:07 am »
I am now building in MSVC 10.0 with the latest head and getting the same exact errors when trying to build the client