Hello Valeriy, thanks for your reply. I tried the hints you gave me and my code looks like that now: file: //--- Main ----------------------------------------------- // Root-Libraries #include <TApplication.h> #include <TGClient.h> // Own class #include "MFTest.h" int main ( int argc, char** argv ) { TApplication application( "ROOT App", &argc, argv ); MFTest t( gClient->GetRoot() ); application.Run(); return 0; } file: //--- MFTest Header ----------------------------------- #ifndef MFTEST_H #define MFTEST_H #include <TGFrame.h> using namespace std; class MFTest : public TGMainFrame { public: MFTest( const TGWindow*, UInt_t = 800, UInt_t = 600 ); ~MFTest(); // Macro ClassDef( MFTest,0 ); }; #endif file: //--- MFTest Implementation --------------------------- #include "MFTest.h" MFTest::MFTest( const TGWindow* p, UInt_t height, UInt_t width ) : TGMainFrame( p, height, width ) { MapWindow(); } MFTest::~MFTest() {} //------------------------------------------------------------------ I created a new dictionary and recompiled all, but the program still crashes at runtime at MapWindow() with the message, "HEAP[client_win32.exe]: Heap block at 020152D8 modified at 020152CC past requested size of ffffffe5". I am sure you see that client_win32.exe is my program. Before compilation I removed libNew.lib from my project libraries because the library was cause for some errors at compile-time. This was the advised way from earlier postings to cope the obstacle. However, I don't think that's the cause for my problem. I use all recommended compiler-flags (e. g. -GX), replaced all dlls as advised and did all other stuff for ROOT for windows. I compiled the app with VC++ single- and multithread-option. Some more ideas? H.-Gerd On Thu, 2003-07-31 at 16:17, Valeriy Onuchin wrote: > Hi H.-Gerd Rosarius, > I appologize for some typos in my previous message. > > 4. use ClassDef( MFTest, 0) > 0 - you don't need object I/O > Check also http://root.cern.ch/root/Using.html > > Regards. Valeriy > > > H.-Gerd Rosarius, > > 0. look at test/guiviewer.h test/guivieer.cxx code and Makefile > > 1. use TApplication (not TGApplication). > > 2. do not include RQ_OBJECT( "MFTest" ) > > That is required anly for interpreted classes. > > 3. create LinkDef.h and dictionary for MFTest class > > > > Must work. > > > > HTH. Regards. Valeriy
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET