当编译没有动态RTL,我得到EAccessViolation
When compiling without dynamic RTL I get EAccessViolation
在Borland c++ Builder 6中,当我试图通过取消勾选"使用动态RTL"来制作一个独立的应用程序时,我得到了EAccessViolation。兆瓦:
#include <vcl.h>
pragma hdrstop
#include "fstream.h"
#include "Unit1.h"
pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
ifstream pies;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{}
里面有一个纯空白项目
ifstream pies;
添加到其中
它在_STLP_IOS_C中分解:在
template <class _CharT, class _Traits>
basic_ios<_CharT, _Traits>::basic_ios()
: ios_base(),
_M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0)
{}
指向
: ios_base(),
我该如何解决这个问题?我需要一个应用程序,我可以移动到其他地方,但我也需要fstream.
要制作一个独立的应用程序,你必须禁用"Use Dynamic RTL"answers"Build with Runtime Packages"选项。