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

霸气de小男生 提交于 2019-12-09 16:28:41

问题


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;
}

回答1:


  1. In the project options, uncheck the linker option "Dynamic RTL".
  2. In the packages options, uncheck "Link with runtime packages".



回答2:


Also you should uncheck:

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



来源:https://stackoverflow.com/questions/7787267/how-create-an-standalone-without-dll-file-dependencies-cbuilder-console-appl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!