• A doubt about C++ compile mode

    From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 13:25:45 2023
    Compiling with MSC32, I see the switch -TP in each line of the log. This
    is the first:

    CL -D__WIN32__ -D_HAVE_SQLITE_CONFIG_H -DHAVE_CONFIG_H -DHARBOUR_CONF -DOPENSSL_NO_DEPRECATED -DHB_NO_DV_MEMCPY -DHB_NO_BACKGROUND -DHB_GUI -I"source\rtl\zlib" -I"contrib\pdflite\include" -I"contrib\png" -I"contrib\tiff" -I"contrib\jpeg" -I"include" -I"e:\msc32\msc\include" -I"obj\vc32" -I"contrib\sixapi\include" -I"contrib\freeimage\include" -I"contrib\gd\include" -I"contrib\xwt\include"
    -I"contrib\xwt\src\xwt_win" -c -GA -Gs -EHsc -nologo -Otyb1 -W4
    -wd4127 -wd4054 -wd4055 -MD -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -MD -MP -O1 -W4 -WX -TP -Foobj\vc32\hbrm.obj utils\misc\hbrm.c

    If I am not missing something, why are we compiling the whole xHarbour
    in C++ mode?

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Pinkas@21:1/5 to Enrico Maria Giordano on Sat Dec 23 11:30:56 2023
    Enrico Maria Giordano wrote:

    Compiling with MSC32, I see the switch -TP in each line of the log. This
    is the first:

    CL -D__WIN32__ -D_HAVE_SQLITE_CONFIG_H -DHAVE_CONFIG_H -DHARBOUR_CONF -DOPENSSL_NO_DEPRECATED -DHB_NO_DV_MEMCPY -DHB_NO_BACKGROUND -DHB_GUI -I"source\rtl\zlib" -I"contrib\pdflite\include" -I"contrib\png" -I"contrib\tiff" -I"contrib\jpeg" -I"include" -I"e:\msc32\msc\include" -I"obj\vc32" -I"contrib\sixapi\include" -I"contrib\freeimage\include" -I"contrib\gd\include" -I"contrib\xwt\include"
    -I"contrib\xwt\src\xwt_win" -c -GA -Gs -EHsc -nologo -Otyb1 -W4
    -wd4127 -wd4054 -wd4055 -MD -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -MD -MP -O1 -W4 -WX -TP -Foobj\vc32\hbrm.obj utils\misc\hbrm.c

    If I am not missing something, why are we compiling the whole xHarbour
    in C++ mode?


    This is a very old issue, IIRC it had to do with a way to be able to set initialization code in C for MSC, (like INIT PROCEDURE in Clipper).

    There was no standard way to set initialization, and each compiler
    has/had its own trick. You may review hbinit.h

    Ron

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Sat Dec 23 19:12:14 2023
    Il 23/12/2023 17:30, Ron Pinkas ha scritto:

    If I am not missing something, why are we compiling the whole xHarbour
    in C++ mode?

    This is a very old issue, IIRC it had to do with a way to be able to set initialization code in C for MSC, (like INIT PROCEDURE in Clipper).

    There was no standard way to set initialization, and each compiler
    has/had its own trick. You may review hbinit.h

    Ok, too much for me.

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)