I've added HB_BUILD_MODE=yes option for all compilers. You may have a try
with mingw.
Brgds,
Viktor

On Mon, Jun 22, 2009 at 2:37 PM, Xavi <jara...@gmail.com> wrote:

> Thanks Viktor,
>
> Override new/delete operator not work when active HB_FM_STATISTICS because
> fm.c is not compiled in mode c++.
> My idea about fm.cpp was to be incorporated the file in the compilation of
> the application user pending further comments, views.
> But of course, to incorporate in Harbour the easiest way is.-
> Incorporate a new file in source/vm fmp.cpp (attached).
> Change the file source/vm/Makefile (attached) .-
> ...
> CPP_SOURCES=\
>        fmp.cpp \
> ...
> Now you can build Harbour with HB_FM_STATISTICS, I've only tested with
> MinGW.
> IMHO I think it's very interesting result of this with static compilation
> of hbqt.
> I did not tested but I think it could work to know what classes deleted and
> are not deleted in hbqt.
>
> --
> Xavi
>
> vszak...@users.sourceforge.net escribió:
>
>  Revision: 11470
>>
>> http://harbour-project.svn.sourceforge.net/harbour-project/?rev=11470&view=rev
>> Author:   vszakats
>> Date:     2009-06-21 18:56:11 +0000 (Sun, 21 Jun 2009)
>>
>> Log Message:
>> -----------
>> 2009-06-21 20:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
>>  * INSTALL
>>    + Added iccia64 build example.
>>
>>  * source/vm/fm.c
>>    + Added C++ new/delete operator override to hb_xgrab()/hb_xfree().
>>      Thanks to Xavi.
>>      Please make any required correction, I didn't do tests with it.
>>
>>  * utils/hbmk2/hbmk2.prg
>>    + Added support for linux/icc compiler. (untested)
>>    ; Tested win/icc support (static exe, shared exe, lib, dll).
>>      It worked, except that in shared mode it will display this,
>>      when the MinGW built .dll is used (instead of its own):
>>      Unrecoverable error 9012: Can't locate the starting procedure: 'MAIN'
>>
>> Modified Paths:
>> --------------
>>    trunk/harbour/ChangeLog
>>    trunk/harbour/INSTALL
>>    trunk/harbour/source/vm/fm.c
>>    trunk/harbour/utils/hbmk2/hbmk2.prg
>>
>>
>> This was sent by the SourceForge.net collaborative development platform,
>> the world's largest Open Source development site.
>> _______________________________________________
>> Harbour mailing list
>> Harbour@harbour-project.org
>> http://lists.harbour-project.org/mailman/listinfo/harbour
>>
>>
>
>
>
>
> #include "hbapi.h"
>
> #ifdef HB_FM_STATISTICS
> void* operator new(size_t nSize)
> {
>   return hb_xgrab(nSize);
> }
>
> void operator delete(void* p)
> {
>   hb_xfree(p);
> }
> #endif
>
> #
> # $Id: Makefile 11347 2009-06-14 12:40:11Z druzus $
> #
>
> ROOT = ../../
>
> ifeq ($(HB_HVM_ALL),)
>
> HB_HVM_ALL = yes
> ifeq ($(HB_COMPILER),watcom)
>        HB_HVM_ALL = no
> endif
> ifeq ($(HB_COMPILER),bcc)
>        HB_HVM_ALL = no
> endif
> ifeq ($(HB_COMPILER),pocc)
>        HB_HVM_ALL = no
> endif
> ifeq ($(HB_COMPILER),pocc64)
>        HB_HVM_ALL = no
> endif
> ifeq ($(HB_COMPILER),poccarm)
>        HB_HVM_ALL = no
> endif
> ifeq ($(HB_COMPILER),xcc)
>        HB_HVM_ALL = no
> endif
> ifeq ($(HB_COMPILER),dmc)
>        HB_HVM_ALL = no
> endif
> export HB_HVM_ALL
> endif
>
> DIRS=
>
> ifeq ($(HB_ARCHITECTURE),win)
>        ifeq ($(HB_COMPILER),mingw)
>                C_MAIN = mainwin.c
>        else
>                C_MAIN = mainstd.c mainwin.c
>        endif
>        DIRS = mainstd mainwin maindllh maindllp
> else
>        ifeq ($(HB_ARCHITECTURE),wce)
>                C_MAIN = mainwin.c
>                DIRS = mainstd mainwin maindllh maindllp
>        else
>                ifeq ($(HB_ARCHITECTURE),os2)
>                        C_MAIN = mainstd.c
>                else
>                        C_MAIN = main.c
>                endif
>        endif
> endif
>
> ifeq ($(HB_HVM_ALL),yes)
>
> C_SOURCES=\
>        hvmall.c \
>
> else
>
> C_SOURCES=\
>        hvm.c \
>        arrays.c \
>        classes.c \
>        dynsym.c \
>        codebloc.c \
>        estack.c \
>        extend.c \
>        fm.c \
>        garbage.c \
>        hashes.c \
>        itemapi.c \
>        macro.c \
>        memvars.c \
>        set.c \
>        thread.c \
>
> endif
>
> C_SOURCES+=\
>        arrayshb.c \
>        asort.c \
>        break.c \
>        cmdarg.c \
>        debug.c \
>        dynlibhb.c \
>        eval.c \
>        evalhb.c \
>        extrap.c \
>        hashfunc.c \
>        initexit.c \
>        initsymb.c \
>        memvclip.c \
>        pcount.c \
>        pvalue.c \
>        proc.c \
>        runner.c \
>        vm.c \
>        $(C_MAIN) \
>
> CPP_SOURCES=\
>        fmp.cpp \
>
> PRG_SOURCES=\
>        harbinit.prg \
>
> LIBNAME=hbvm
>
> HB_USER_CFLAGS:=$(subst -DHB_MT_VM,,$(HB_USER_CFLAGS))
> ifneq ($(HB_ARCHITECTURE),dos)
> ifneq ($(HB_MT),no)
>        DIRS+= vmmt
> endif
> endif
>
> include $(TOP)$(ROOT)config/lib.cf
> ifneq ($(DIRS),)
>        include $(TOP)$(ROOT)config/dir.cf
> endif
>
> _______________________________________________
> Harbour mailing list
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
>
>
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to