svkaiser / Doom64EX

Doom64EX is a reverse-engineering project aimed to recreate Doom64 as close as possible with additional modding features.
http://doom64ex.wordpress.com/
GNU General Public License v2.0
237 stars 49 forks source link

MSVC 16 compiler errors on i_main.cc #108

Closed user21944 closed 4 years ago

user21944 commented 4 years ago

I'm relatively new to building things and was trying to compile the latest version of this project. I successfully created the build files but after compiling, there are 17 errors all in src/engine/system/i_main.cc between line 443 and 448. I have no knowledge of C++ so I don't know how I would fix this but because of the errors I can't build Doom64EX.

This is on 64-bit Windows 10 1909 with a MSVC 16 compiler and the latest Windows 10 SDK. The exact errors are as follows: image

The lines affected (442 - 449):

int D_abs(int x) {
    __asm {
        mov eax,x
        cdq
        xor eax,edx
        sub eax,edx
    }
}

I followed the same instructions for building on Win32 in the readme so if I did anything wrong, help would be nice.

Serosis commented 4 years ago

Visual Studio doesn't support inline assembly for 64-bit solutions.

You'd have to convert the assembly to C++.