Visual Studio 2022 C++/cli error 1>F_Engine.lib(MuzzleFlash.h.obj) : error LNK2001: unresolved external symbol __imp_MapViewOfFileNuma2

Mike Fakoukakis 21 Reputation points
2022-03-22T16:57:56.517+00:00

I'm developing a c++ project and need to expose it to C# for a GUI using WPF. I created a wrapper using C++/cli (very simple, I can post code if needed) and when I compile the C++/cli wrapper I get the error

1>F_Engine.lib(MuzzleFlash.h.obj) : error LNK2001: unresolved external symbol __imp_MapViewOfFileNuma2

Does anyone know what this error is and how I can get rid of it?

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
338 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,780 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 45,866 Reputation points
    2022-03-22T17:38:02.49+00:00

    You need to provide the import library for the indicated function as input to the linker for your c++/cli project.

    See the library references at the bottom of this page

    nf-memoryapi-mapviewoffilenuma2

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Mike Fakoukakis 21 Reputation points
    2022-03-22T18:56:51.85+00:00

    Thanks a lot. I've visited that page too but didn't pay attention at the references at the end.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.