Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

- - - - -

CMake project fix for MSVC x86_64


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 quarnster   Members   -  Reputation: 193

Like
0Likes
Like

Posted 05 August 2012 - 04:14 AM

Since there's an assembly file for MSVC x86_64 this should be added before or after the ANDROID block in sdk/AngelScript/projects/cmake/CMakeLists.txt:
if(MSVC AND CMAKE_CL_64)
	    enable_language(ASM_MASM)
	    if(CMAKE_ASM_MASM_COMPILER_WORKS)
			    set(ANGELSCRIPT_SOURCE ${ANGELSCRIPT_SOURCE} ../../source/as_callfunc_x64_msvc_asm.asm)
	    else()
			    message(FATAL ERROR "MSVC x86_64 target requires a working assembler")
	    endif()
endif()

I also had to edit the code block around line 1131 in angelscript.h from
if(sizeof(void*) == 4)
to
#ifndef AS_64BIT_PTR
, otherwise the compiler would complain about not being able to static cast the data types involved when trying to register CallMe1 in testmultipleinheritance.cpp.

BTW TestSaveLoad reports (but still says it passed)
The saved byte code is not of the expected size. It is 1760 bytes
The saved byte code contains a different amount of zeroes than the expected. Co
nted 530
The saved byte code has different checksum than the expected. Got 0x87C6163E

Not sure if that's a real problem or not as the test passed anyway.

Ad:

#2 Andreas Jonsson   Moderators   -  Reputation: 2309

Like
0Likes
Like

Posted 05 August 2012 - 02:27 PM

I've checked in these changes, as well as a bug fix in the bytecode saving in revision 1383.

The output from TestSaveLoad was because of a 64bit bug, however it didn't show itself on Linux 64bit. I attribute this to the fact that Microsoft forces all user memory to be mapped to addresses above 4GB, presumably to catch these kind of bugs more easily.

Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS