Results 1 to 5 of 5

Thread: Compoiler Error 4332 with tWinPaintStruct

  1. #1
    Join Date
    Apr 2009
    Posts
    492

    Default Compoiler Error 4332 with tWinPaintStruct

    When compiling with Dataflex 19.1 one of my src-Files I see the Error 4332:
    When compiling with Dataflex 19.0 no Errors happen!

    - Including file: cDRPreviewWindow.pkg (C:\Apps\DataFlex 19.1\Libraries\DataFlex Reports 7\AppSrc\cDRPreviewWindow.pkg)
    - Error 4332: C:\Apps\DataFlex 19.1\Libraries\DataFlex Reports 7\AppSrc\cDRPreviewWindow.pkg (ln 21) Symbol already defined tWinPaintStruct

    Where can tWinPaintStruct be already defined? What can I do?

    Searching with Studio in Dataflex 19.1 (including all Dataflex files and all my source code files) for tWinPaintStruct :

    C:\Apps\DataFlex 19.1\Libraries\DataFlex Reports\AppSrc\cDRPreviewWindow.pkg
    - (Ln 119) tWinPaintStruct PaintData
    - (Ln 124) tWinPaintStruct PaintData
    C:\Apps\DataFlex 19.1\Libraries\DataFlex Reports 7\AppSrc\cDRPreviewWindow.pkg
    - (Ln 21) Struct tWinPaintStruct
    - (Ln 128) tWinPaintStruct PaintData
    C:\Apps\DataFlex 19.1\Pkg\Dfshape.pkg
    - (Ln 161) tWinPaintStruct paintStruct
    C:\Apps\DataFlex 19.1\Pkg\tWinStructs.pkg
    - (Ln 802) Struct tWinPaintStruct

    Code:
    C:\Apps\DataFlex 19.1\Pkg\tWinStructs.pkg
    Struct tWinPaintStruct
        Handle hdc
        Integer fErase
    #IFDEF IS$WIN64
        Integer iMissingAlignment
    #ENDIF
        tWinRect rcPaint
        Integer fRestore
        Integer fIncUpdate
        UChar[32] rgbReserved
    End_Struct
    
    C:\Apps\DataFlex 19.1\Libraries\DataFlex Reports 7\AppSrc\cDRPreviewWindow.pkg
    Struct tWinPaintStruct
        Handle   hDC
        Integer  fErase
        tWinRect rcPaint
        Integer  fRestore
        Integer  fIncUpdate
        Char[32] rgbReserved
    End_Struct
    I thought that a Struct can only once be defined in an application?

    Compiling my other src-Files no error happens.
    Last edited by Emil Preter; 1-Feb-2020 at 02:12 PM.

  2. #2
    Join Date
    Jan 2009
    Location
    Richmond, VA
    Posts
    5,854

    Default Re: Compoiler Error 4332 with tWinPaintStruct

    Emil,

    Duplicate definitions were never good (the last one compiled "won") but in 19.1 the compiler catches them. You can just comment out the duplicate (I'd comment out the one in cDRPreviewWindow.pkg because the one in our packages is already designed for 64-bit support).
    Best regards,

    -SWM-

  3. #3
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Compoiler Error 4332 with tWinPaintStruct

    Emil,

    Did you do you own library migration? The cDRPreviewWindow.pkg of the released library for 19.1 does not have this structure defined. Note that the 19.0 version of the library contains the structure definition as it was not present in the standard packages.

    Note: Library migration should only be done with the libraries you own! Or you must want to do the same work as the library programmer has to do anyway.
    Note 2: The DataFlex Reports libraries are different for each DataFlex version. Not only in code but also the wizard was newly compiled and you can never re-compile the wizard
    Last edited by Vincent Oorsprong; 2-Feb-2020 at 04:04 AM.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  4. #4
    Join Date
    Apr 2009
    Posts
    492

    Default Re: Compoiler Error 4332 with tWinPaintStruct

    in the meantime I have seen that it depends on the individual workspace whether the error occurs when compiling or not even if the sources of the individual workspace are quite similar!
    Can different attitudes be responsible for this and if so which?
    I have done Library migration.
    I send you my cDRPreviewWindow.pkg
    Attached Files Attached Files

  5. #5
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Compoiler Error 4332 with tWinPaintStruct

    Emil,

    The right thing to do is NOT to migrate the library yourself and simply use what we supply.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •