Skip to content

Compiling C++/CLIS #198

@Garciat

Description

@Garciat

Has anyone looking into compiling with the /clr option?

For example:

int main()
{
    System::Console::WriteLine("This is a C++/CLI program.");
}
./msvc/bin/x64/cl /clr hello.cpp

Error:

Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35213
for Microsoft (R) .NET Framework version -----------
Copyright (C) Microsoft Corporation.  All rights reserved.

hello.cpp
hello.cpp: fatal error C1093: API call 'LoadLibraryW("alink.dll")' failed '0x80070006': ErrorMessage: Invalid handle.

Description: <Unknown>

See: https://learn.microsoft.com/en-us/cpp/build/walkthrough-compiling-a-cpp-cli-program-on-the-command-line?view=msvc-170

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions