On Fri, 06 Mar 2009, Szak�ts Viktor wrote:
> > and check if startup code is executed and modules are registers.
> > Please make this test for two versions: pure C build (/TC) and C++
> > build (/TP). It's possible that the behavior will be different.
> > It will give basic information about farther modifications.
> I've checked with these settings:
> set HB_COMPILER=msvc
> set HB_USER_CFLAGS=-GL -TP
> set HB_USER_LDFLAGS=/LTCG
> set HB_USER_AFLAGS=/LTCG
> And the text "registering module" isn't even present in the
> final Harbour executables. So it looks a bit worse than expected.
I hope you are creating console application so printf() works.
Have you tested it without /LTCG?
And please do not try to intorduce too mant switches at once because
it will be hard to check which one change the behavior. What -GL does?
Next check pure C compilation. I would like to know if it also does not
work. Use hbrun as test application.
The fact that C++ initialization does not work is very strange for me.
Looks like a bug. This code:
static PHB_SYMB symbols = hb_vmProcessSymbolsEx( ... ); \
_have_to_ be executed if MSVC supports C++ basic standards.
I've just check hbinit.h and we still have this code:
#if defined(_MSC_VER) && \
!defined(__LCC__) && !defined(__POCC__) && !defined(__XCC__) && \
!defined(HB_STRICT_ANSI_C) && !defined(HB_STATIC_STARTUP) && \
!defined(HB_PRAGMA_STARTUP) && !defined(HB_MSC_STARTUP)
/* In order to maintain compatibility with other products, MSVC should
always use this startup. If you know that you can use HB_STATIC_STARTUP
below, then all you need to do is define HB_STATIC_STARTUP to the
compiler.
Sat 07 Maj 2005 02:46:38 CEST
This is only necessary when you want to create binary libs using
MSC in C++ mode (-TP switch) and later this binaries will be linked
by standard C linker with [x]Harbour programs. I strongly suggest
to for 3-rd party developers to use MSC in standard C mode to create
libraries which can be used with standard C compilers. This will
eliminate the problem and we will be able to set C++ initialization
as default for MSC in C++ mode. Druzus.
*/
#define HB_MSC_STARTUP
#endif
Try to comment:
#define HB_MSC_STARTUP
and rebuild whole Harbour code.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour