Tools, FAQ, Tutorials:
Build and Run C++/CLI Programs
How to build and run a C++/CLI program with Visual Studio command tools? I have "C++/CLI Support" installed.
✍: FYIcenter.com
If you have "C++/CLI Support" installed with Visual Studio, you can follow this tutorial to build and run a C++/CLI program:
1. Enter the C++/CLI program, HelloCLI.cpp with a text editor:
// HelloCLI.cpp // Copyright (c) FYIcenter.com int main() { System::Console::WriteLine("Hello World! - From C++/CLI."); }
2. Run "All Programs > Visual Studio 2017 > Visual Studio Tools > Developer Command Prompt for VS 2017". You see the Visual Studio Command Prompt window.
3. Compile the C++/CLI program, HelloCLI.cpp, with the "/clr" (Common Language Runtime) option:
C:\fyicenter>cl /c /clr HelloCLI.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for Microsoft (R) .NET Framework version 4.06.1055.0 Copyright (C) Microsoft Corporation. All rights reserved. HelloCLI.cpp
4. Link the object code:
C:\fyicenter>link HelloCLI.obj Microsoft (R) Incremental Linker Version 14.10.25019.0 Copyright (C) Microsoft Corporation. All rights reserved.
5. Run the executable code:
C:\fyicenter>HelloCLI.exe Hello World! - From C++/CLI.
⇒ Visual C++ Examples Provided by Microsoft
⇐ Install C++/CLI Support with Visual Studio Installer
2023-06-19, 1474🔥, 0💬
Popular Posts:
What is EPUB 3.0 Metadata "dcterms:modified" property? EPUB 3.0 Metadata "dcterms:modified" is a req...
How to use the "Ctrl-p Ctrl-q" sequence to detach console from the TTY terminal of container's runni...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
How to add request URL Template Parameters to my Azure API operation 2017 version to make it more us...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...