Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How create an standalone (without DLL file dependencies) C++Builder console application like a Delphi application?

When I create a Delphi console application, I can deploy the generated EXE file without worrying about external DLL files. But if I create very simple C++Builder (version 2007) console application (no VCL) the EXE file requires the CC3280MT.dll file to run.

How can I avoid which my C++Builder console application requires the CC3280MT.dll file?

Even this simple code cause this dependence:

#include <iostream.h>
#pragma hdrstop

#pragma argsused
int main(int argc, char* argv[])
{
    cout << "Hello" << endl;
    getchar();
    return 0;
}
like image 705
Salvador Avatar asked Oct 16 '11 20:10

Salvador


2 Answers

  1. In the project options, uncheck the linker option "Dynamic RTL".
  2. In the packages options, uncheck "Link with runtime packages".
like image 165
ildjarn Avatar answered Oct 19 '22 14:10

ildjarn


Also you should uncheck:

Project Options -> C++ Linker -> Link with the Delphi Runtime Library ...

like image 25
nickolay Avatar answered Oct 19 '22 15:10

nickolay