简体   繁体   中英

syntax error: missing ')' before identifier 'a'

I am attempting to build a dll on Visual Studio 2019 (for using in Unity later) from a c++ sdk project that was previously compiled with gcc. I am getting some syntax errors while compiling and for the following function:

static inline uint8_t MyFunction(const uint64_t *__restrict__ a, const uint64_t *__restrict__ b)

I get this error:

Severity    Code    Description Project File    Line    Suppression State
Error   C2146   syntax error: missing ')' before identifier 'a'  

Any clue on how to fix this? And in general on how to solve other errors stemming from changing compilers like this?

__restrict__ is specific to gcc and clang. The MSVC equivalent is __restrict .

There is no 'general way' to resolve differences between compilers. You have to deal with them on a case-by-case basis.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM