000
02.11.2006, 15:34 Uhr
~myme
Gast
|
Hallo Leute, habe ein Problem beim laufen einer Application wenn sie ohne "dynamic RTL" gebuildet wurde. Hoffe, die englische Beschreibung stoert nicht - wenn doch, werd kann ichs gerne nochmal in deutsch tippseln
I have a BCB6 project which runs fine in the debug environment / on the development pc (WinXP). But what I want is to compile a standalone .exe which runs on its own without any additional files (components, dll, ..). For this, as I understand, the following options in the project settings have to be untagged: - Packages - Build with runtime packages - Linker - Use dynamic RTL
As soon as I untag the "use dynamic RTL" the following error message shows up when I run the program: "Access violation at address xxxxxxx. Read of address 00000000."
By debugging into the project, I could gather the following informtation: This happens BEFORE the main fuction is called. (placing breakpoint at beginning of main, looking at callStack). When debugging, the execution stopps in ../cbuilder6/include/stl/_ios.c at the basic_ios template, which is not my code. The callStack lists Log::Log, which is in my code (code and callstack see below). It is possible to place a breakpoint in the line marked with "#1" but will not reach "#2" - the problem happens before.
I have already tried to remove global variables from class files (found this to be the possible cause by research). This did not change anything. There are, however, files with global functions in the project.
I am new to BCB and would very much appreciate your help. myme
//********************************************* //*********************************** CALLSTACK //*********************************************
7C812A5B CWINNT\system32\kernel32.dll 004E970B ___raiseDebuggerException 004E2100 ___DefHandler 7C9037BF ntdll.dll 7C90378B ntdll.dll 7C90EAFA ntdll.dll 004EE7E3 _STL::ios_base::ios_base 0042D092 _STL::basic_ios<char, _STL::char_traits<char> >::basic_ios<char, _STL::char_traits<char> >(this=:0052156C) 0042C994 _STL::basic_ofstream<char, _STL::char_traits<char> >::basic_ofstream<char, _STL::char_traits<char> >(this=:005214BC) 0042C8B0 Log::Log(this=:005214B4) 004168BD _STCON0_() 004E813D __init_exit_proc 004E8313 __startup
//********************************************* //************************************* log.cpp //********************************************* #include "log.h" #include <string>
Log::Log() { //Breakpoint #1 - stopps here msg_counter=0; //Breakpoint #2 - does not get here num_of_msg=0; MAX_NUM_OF_MSG=10; messages= new string[MAX_NUM_OF_MSG]; has_changed_since_last_read=false; changes_since_last_read=0; has_file=false; } .....
//********************************************* //************************************** _ios.c //********************************************* .... // Protected constructor and initialization functions. The default // constructor creates an uninitialized basic_ios, and init() initializes // all of the members to the values in Table 89 of the C++ standard.
template <class _CharT, class _Traits> basic_ios<_CharT, _Traits>::basic_ios() : ios_base(), //stopps here (arrow) _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0) {} .... |