0

I recently worked a bit with AngelScript and came across some linker errors when trying to compile in x64. If I try to compile my c++ code in x86 everything works fine. After a bit of research I noticed that inline assembly is not supported anymore by MSVC for x64.

Is there a AngelScript code version without the inline assembly so I can compile everything in x64?

Michael Haephrati
  • 3,660
  • 1
  • 33
  • 56
  • Compilers other than MSVC have no problem with inline asm for ISAs other than 32-bit x86. Have you tried with `clang-cl`? Of course, that's not going to help unless the code you're building actually has 64-bit compatible inline asm. Most inline asm for 32-bit assumes stuff like 32-bit pointers, and may take depend on things like leaving a return value in EAX and falling off the end of a non-void function, which MSVC supports by clang-cl doesn't. – Peter Cordes Oct 09 '21 at 00:43
  • Yes, I already tried that. I think they will have to update their code to not use inline asm if there is a stable x64 bit version planned. But thank you very much! –  Oct 09 '21 at 11:37

1 Answers1

2

The solution is outlined in the AngelScript documentation; you basically have to add the as_callfunc_x64_msvc_asm file to the build for 64 bit.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83