Re: Serious Bug

2003-10-29 Thread Boaz Harrosh
I'm Just exactly now fighting same problems.
See my last post: "Help with shared library make files"
Note 2 things
A. Initialization order is opposite of msvc++ Last object on the linker 
gets to run first. (msvc first on the command line first to initialize)

B. Hard, in gdb (kdevelop), to set a break point on pre-main code. use 
below file to do that. Put it as last object linked and after any 
library. In effect it is an "int 0x03" instruction to hard code a break 
point.

C. All DLLs linked to the MyApp.dll.so should also link to MyApp.exe.so 
see my wine post: "wine msvcrt on Library initialization". These are the 
ones that get linked through winebuild.



#include "windows.h"

#define _CrtDbgBreak()  __asm__ ("\tint $0x3\n")

class TestStaticClass
{
public:
TestStaticClass() ;
~TestStaticClass() ;
} ;
TestStaticClass::TestStaticClass()
{
   MessageBox(NULL ,"Constructor" ,"Cpp_Globs_stop" ,MB_OK) ;
   _CrtDbgBreak();
}
TestStaticClass::~TestStaticClass()
{
   MessageBox(NULL ,"Destructor" ,"Cpp_Globs_stop" ,MB_OK) ;
}
TestStaticClass g_StaticClass ;


$(mfctest_dll_MODULE).so:  $(mfctest_dll_MODULE).spec.o 
$(mfctest_dll_OBJS) Cpp_Globs_stop.o
   $(LDXXSHARED) $(LDDLLFLAGS) -o $@ \
   $(mfctest_dll_MODULE).spec.o \
   $(mfctest_dll_OBJS) \
   $(mfctest_dll_LIBRARY_PATH) \
   $(mfctest_dll_LIBRARIES:%=-l%) \
   $(ALL_LIBRARIES) \
   Cpp_Globs_stop.o \



Now you can single step the initialization chain.

flyker wrote:

Boaz Harrosh wrote:

use --wrap in winemaker. Read about this option in the documentation

Thanks. It is work :)








Re: Serious Bug

2003-10-29 Thread flyker
Boaz Harrosh wrote:

use --wrap in winemaker. Read about this option in the documentation

Thanks. It is work :)





Re: Serious Bug

2003-10-29 Thread flyker
Vincent Béron wrote:

Huh?
Works fine here cross-compiled with mingw.
Even added 2 printf (one to the constructor, the other in WinMain), and
the constructor one is called first (as it should be).
Vincent

RedHat 9.0,  gcc and winelib.
Of course constructor first.





Re: Serious Bug

2003-10-29 Thread Vincent Béron
Le mer 29/10/2003 à 09:02, flyker a écrit :
> 
> The simple test crashes wine.
> And i think many other commands in constructor A() may crash wine.

Huh?
Works fine here cross-compiled with mingw.
Even added 2 printf (one to the constructor, the other in WinMain), and
the constructor one is called first (as it should be).

Vincent