Compile error vs2010

Want to discuss changes to the UOX3 source code? Got a code-snippet you'd like to post? Anything related to coding/programming goes here!
Post Reply
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Compile error vs2010

Post by xantier »

Code: Select all

1>------ Build started: Project: UOX3_Official, Configuration: Debug Win32 ------
1>Build started 20.12.2011 17:25:18.
1>InitializeBuildStatus:
1>  Touching ".\Debug\UOX3_Official.unsuccessfulbuild".
1>ClCompile:
1>  CGump.cpp
1>  CJSEngine.cpp
1>  CJSMapping.cpp
1>  CPacketReceive.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cpacketreceive.cpp(623) :  NOTE :   "Flush location"
1>  
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cpacketreceive.cpp(750) :  NOTE :   "Flush location"
1>  
1>  CPacketSend.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cpacketsend.cpp(248) :  NOTE :   "Function Warning: CPacketSpeech::Language(), does nothing"
1>  
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cpacketsend.cpp(391) :  NOTE :   "we need to update this here to determine what goes on with elves too!"
1>  
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cpacketsend.cpp(1628) :  NOTE :   "We need to check what the values are, OSI wise, for this value.  Are elfs 2/3?"
1>  
1>  CResponse.cpp
1>  Dictionary.cpp
1>  JSEncapsulate.cpp
1>  ObjectFactory.cpp
1>  PartySystem.cpp
1>  SEFunctions.cpp
1>  UOXJSMethods.cpp
1>  UOXJSPropertyFuncs.cpp
1>  ai.cpp
1>  archive.cpp
1>  boats.cpp
1>  books.cpp
1>  cAccountClass.cpp
1>  cBaseobject.cpp
1>  cChar.cpp
1>c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cchar.cpp(236): error C2668: 'std::bitset<_Bits>::bitset' : ambiguous call to overloaded function
1>          with
1>          [
1>              _Bits=32
1>          ]
1>          c:\program files\microsoft visual studio 10.0\vc\include\bitset(174): could be 'std::bitset<_Bits>::bitset(const char *)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>          c:\program files\microsoft visual studio 10.0\vc\include\bitset(136): or       'std::bitset<_Bits>::bitset(_ULonglong)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>          c:\program files\microsoft visual studio 10.0\vc\include\bitset(127): or       'std::bitset<_Bits>::bitset(int)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>          while trying to match the argument list '(const UOX::UI32)'
1>  Generating Code...
1>  Compiling...
1>  cConsole.cpp
1>c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cconsole.cpp(116): warning C4018: '>' : signed/unsigned mismatch
1>c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cconsole.cpp(123): warning C4018: '>' : signed/unsigned mismatch
1>  cDice.cpp
1>  cGuild.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cguild.cpp(1339) :  NOTE :   "Move guildstone functionality goes here"
1>  
1>  cHTMLSystem.cpp
1>  cItem.cpp
1>  cMultiObj.cpp
1>  cPlayerAction.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cplayeraction.cpp(2481) :  TODO :   "We need to update this to use getTileName almost exclusively, for plurality"
1>  
1>  cRaces.cpp
1>  cScript.cpp
1>  cServerData.cpp
1>c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\cserverdata.cpp(1485): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'size_t' (or there is no acceptable conversion)
1>          c:\program files\microsoft visual studio 10.0\vc\include\bitset(511): could be 'std::bitset<_Bits> &std::bitset<_Bits>::operator =(const std::bitset<_Bits> &)'
1>          with
1>          [
1>              _Bits=9
1>          ]
1>          while trying to match the argument list '(std::bitset<_Bits>, size_t)'
1>          with
1>          [
1>              _Bits=9
1>          ]
1>  cServerDefinitions.cpp
1>  cSocket.cpp
1>  cSpawnRegion.cpp
1>  cThreadQueue.cpp
1>  cVersionClass.cpp
1>  cWeather.cpp
1>  calcfuncs.cpp
1>  cmdtable.cpp
1>  combat.cpp
1>  commands.cpp
1>  Generating Code...
1>  Compiling...
1>  dist.cpp
1>  effect.cpp
1>  fileio.cpp
1>  findfuncs.cpp
1>  gumps.cpp
1>  house.cpp
1>  items.cpp
1>  jail.cpp
1>  lineofsight.cpp
1>  magic.cpp
1>  mapstuff.cpp
1>c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\mapstuff.cpp(1180): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'UOX::UI32' (or there is no acceptable conversion)
1>          c:\program files\microsoft visual studio 10.0\vc\include\bitset(511): could be 'std::bitset<_Bits> &std::bitset<_Bits>::operator =(const std::bitset<_Bits> &)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>          while trying to match the argument list '(std::bitset<_Bits>, UOX::UI32)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\mapstuff.cpp(1203): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'UOX::UI32' (or there is no acceptable conversion)
1>          c:\program files\microsoft visual studio 10.0\vc\include\bitset(511): could be 'std::bitset<_Bits> &std::bitset<_Bits>::operator =(const std::bitset<_Bits> &)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>          while trying to match the argument list '(std::bitset<_Bits>, UOX::UI32)'
1>          with
1>          [
1>              _Bits=32
1>          ]
1>  movement.cpp
1>  msgboard.cpp
1>  network.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\network.cpp(583) :  NOTE :   "Flush location"
1>  
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\network.cpp(748) :  NOTE :   "Flush location"
1>  
1>  npcs.cpp
1>  pcmanage.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\pcmanage.cpp(836) :  NOTE :   "HTML Status for Players"
1>  
1>  quantityfuncs.cpp
1>  queue.cpp
1>  regions.cpp
1>  c:\documents and settings\administrator\belgelerim\deniz\programming\uox3\projects\uox3\source\regions.cpp(102) :  TODO :   "PlayerHTML Dumping needs to be reimplemented"
1>  
1>  scriptc.cpp
1>  Generating Code...
1>  Compiling...
1>  skills.cpp
1>  sound.cpp
1>  speech.cpp
1>  ssection.cpp
1>  targeting.cpp
1>  threadsafeobject.cpp
1>  townregion.cpp
1>  trade.cpp
1>  uox3.cpp
1>  ustring.cpp
1>  vendor.cpp
1>  weight.cpp
1>  wholist.cpp
1>  worldmain.cpp
1>  Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:06:08.57
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
latest svn.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hm. I'm using VS6 and VS2008 Express, and I'm not seeing those compiling errors. Not sure what's up there. Maybe giwo knows.
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

This is a bug in VS2010, the work-around is to cast the unsigned long to an unsigned long long.

I would recommend you try changing line 31 in typedefs.h from

Code: Select all

	typedef unsigned long int UI32;
to

Code: Select all

	typedef unsigned long long UI32;
Note this may have other negative effects and potentially increase the memory footprint of UOX3, so the best solution would be to only change the instances that are throwing errors or compile in VS2008

http://stackoverflow.com/questions/6947 ... ing-vs2010
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post by xantier »

giwo wrote:This is a bug in VS2010, the work-around is to cast the unsigned long to an unsigned long long.

I would recommend you try changing line 31 in typedefs.h from

Code: Select all

	typedef unsigned long int UI32;
to

Code: Select all

	typedef unsigned long long UI32;
Note this may have other negative effects and potentially increase the memory footprint of UOX3, so the best solution would be to only change the instances that are throwing errors or compile in VS2008

http://stackoverflow.com/questions/6947 ... ing-vs2010
unfortunately, i got more errors. i will simply install vs2008, i hope it fixes this.
Tom
UOX3 Neophyte
Posts: 31
Joined: Tue Dec 20, 2011 9:36 pm
Location: Berkeley
Has thanked: 0
Been thanked: 0

Post by Tom »

I'm having trouble with spidermonkey compiling, I have several compilers installed, and my nmake wont work. Also having no luck finding a way to manually set my enviroment paths. Reinstalling isnt an option, and my vcvars is from a different pc installation. Does anyone know how to set the path manually? This my last obstacle to compiling. Even better, a download of the js32.dll and js32.lib from the current build pre-compiled?
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post by xantier »

okay i installed vs2008 and compiled it successfully. you must compile js32.lib and .dll and set library path for these. otherwise, you will get link error with js32.lib
Tom
UOX3 Neophyte
Posts: 31
Joined: Tue Dec 20, 2011 9:36 pm
Location: Berkeley
Has thanked: 0
Been thanked: 0

Post by Tom »

If you could check your system/advanced/enviroment variables.. and post the value and path it added, I could manually enter them.

Other than that I'm stuck without the js32.lib, the dll is included in the UOX3 folder.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Not sure if it will help you, as you're using VS2008/2010, but the following archive contains two versions (one from 2006 and the other from 2007) of the release/debug js32.lib files that I compiled in VS6 back in the day, and have been using since:
js32_lib.7z (RAR-version)

I'd upload the ones I have for 2008 Express, but that computer is on a different continent at the moment, and I won't have access to it again until after New Year.
-= Ho Eyo He Hum =-
Tom
UOX3 Neophyte
Posts: 31
Joined: Tue Dec 20, 2011 9:36 pm
Location: Berkeley
Has thanked: 0
Been thanked: 0

Post by Tom »

Thank you so much, I have 6 pro and 2008 installed actually, along with a few others :)

I have a good feeling it will work! I'll post back to let you know.
Tom
UOX3 Neophyte
Posts: 31
Joined: Tue Dec 20, 2011 9:36 pm
Location: Berkeley
Has thanked: 0
Been thanked: 0

Post by Tom »

Worked like a charm, thanks Xuri!

I'll try to assist xantier with the client version issues. Dragon had a good question about why though, Id like to see the reply. A somewhat newer client could be made to behave like an older one, unless there is something I am missing.
Post Reply