c++console-applicationvclmigratec++builder-10.1-berlin

C++ Builder How to convert a Console app to a VCL console app?


BACKGROUND
I have a console application created with the "Console Application Wizard" and at that point it was a plain C++ project (no VCL framework).

Now I need some VCL classes and need to convert this project to a Console VCL project.

PROBLEM
It isn't enough to just add the vcl.h, the startup code needs to be replaced too. The console wizard is selecting the startup code you create a new project, but now I want to migrate it and can't find any way to change the project to console VCL.


Solution

  • You can't change the existing project. You need to make a new Console project and set the Target Framework to VCL in the Console Application Wizard, then you can add your existing source code to the project as needed.