Menu

#109 #100 CGUI 2.1 does not build on Windows

v1.6.5
open
nobody
None
5
2023-02-14
2023-02-14
No

I am looking forward to using the CGUI library.
However I receive this error message when building it:

c:/users/joe/documents/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bi
n/ld.exe: cgui21.exp:fake:(.edata+0x1f0): undefined reference to `InsertIntoWinC
lip'
collect2.exe: error: ld returned 1 exit status
C:\Users\Joe\Documents\MinGW\bin\dllwrap.exe: C:\Users\Joe\Documents\MinGW\bin\g
cc exited with status 1
make: *** [lib/mingw32/cgui21.dll] Error 1

(Note: this problem is similar to closed ticket #100.)
Thank you for your assistance.

Related

Bugs: #109

Discussion

  • Christer Sandberg

    Thank you for the bug report.
    I have downloaded the 2.1 packages (both zip and tar) and made a global
    text search through the entire source code, and get no matches for the text
    "InsertIntoWinClip" and get no matches. However, I looked into the revision
    history on sourceforge and found that there exists a reference to
    InsertIntoWinClip in the file obedbox.c in the src directory. Can you check
    if this is the case also in your code? If so, I guess that you have got an
    older version ov CGUI, not 2.1.

    Den tis 14 feb. 2023 kl 03:51 skrev Joseph Reilly jcr2023@users.sourceforge.net:


    Status: open
    Group: v1.6.5
    Created: Tue Feb 14, 2023 02:51 AM UTC by Joseph Reilly
    Last Updated: Tue Feb 14, 2023 02:51 AM UTC
    Owner: nobody

    I am looking forward to using the CGUI library.
    However I receive this error message when building it:

    c:/users/joe/documents/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bi
    n/ld.exe: cgui21.exp:fake:(.edata+0x1f0): undefined reference to
    `InsertIntoWinC
    lip'
    collect2.exe: error: ld returned 1 exit status
    C:\Users\Joe\Documents\MinGW\bin\dllwrap.exe:
    C:\Users\Joe\Documents\MinGW\bin\g
    cc exited with status 1
    make: *** [lib/mingw32/cgui21.dll] Error 1

    (Note: this problem is similar to closed ticket #100.)
    Thank you for your assistance.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/cgui/bugs/109/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    Christer

     

    Related

    Bugs: #109

  • Joseph Reilly

    Joseph Reilly - 2023-02-14

    Hello Christer,Thank you for the quick response!There was no reference in obedbox.c for 'InsertIntoWinClip'.I searched other files in CGUI directories and found one reference.It is in line 12 of 'clipwin.h':CGUI_FUNC(int, InsertIntoWinClip, (char *p));Best regards,Joe

    From: "Christer Sandberg" chrisan@users.sourceforge.net
    To: "[cgui:bugs] " 109@bugs.cgui.p.re.sourceforge.net
    Subject: [cgui:bugs] Re: #109 #100 CGUI 2.1 does not build on Windows
    Date: Tue, 14 Feb 2023 09:46:14 -0000

     
    • Christer Sandberg

      Hi
      OK, you can remove that line, but that will not solve the problem. There is
      a text file cgui/lib/mingw32/cgui.def. Line 114 should look like this:
      InsertIntoWinClip @112
      Remove that line.
      There is another text file cgui/misc/dllsyms.lst which has a line 112 that
      looks like:
      InsertIntoWinClip
      Remove the text from that line but keep the empty line.

      In the best case this will solve the problem, but I doubt it will.
      It might seem strange that I haven't discovered these problems myself, but
      I am working on Linux only - I haven't even access to a Windows computer.
      Christer

      Den tis 14 feb. 2023 kl 17:32 skrev Joseph Reilly jcr2023@users.sourceforge.net:

      Hello Christer,Thank you for the quick response!There was no reference in
      obedbox.c for 'InsertIntoWinClip'.I searched other files in CGUI
      directories and found one reference.It is in line 12 of
      'clipwin.h':CGUI_FUNC(int, InsertIntoWinClip, (char *p));Best regards,Joe

      From: "Christer Sandberg" chrisan@users.sourceforge.net
      To: "[cgui:bugs] " 109@bugs.cgui.p.re.sourceforge.net
      Subject: [cgui:bugs] Re: #109 #100 CGUI 2.1 does not build on Windows
      Date: Tue, 14 Feb 2023 09:46:14 -0000


      Status: open
      Group: v1.6.5
      Created: Tue Feb 14, 2023 02:51 AM UTC by Joseph Reilly
      Last Updated: Tue Feb 14, 2023 02:51 AM UTC
      Owner: nobody

      I am looking forward to using the CGUI library.
      However I receive this error message when building it:

      c:/users/joe/documents/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bi
      n/ld.exe: cgui21.exp:fake:(.edata+0x1f0): undefined reference to
      `InsertIntoWinC
      lip'
      collect2.exe: error: ld returned 1 exit status
      C:\Users\Joe\Documents\MinGW\bin\dllwrap.exe:
      C:\Users\Joe\Documents\MinGW\bin\g
      cc exited with status 1
      make: *** [lib/mingw32/cgui21.dll] Error 1

      (Note: this problem is similar to closed ticket #100.)
      Thank you for your assistance.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cgui/bugs/109/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Christer

       

      Related

      Bugs: #109

  • Joseph Reilly

    Joseph Reilly - 2023-02-15

    Hello Christer,I made the edit to cgui.def and dllsyms.lst that you suggested and it eliminated the undefined reference error for 'InsertIntoWinClip'. During compilation, there was one other error resulting in failure regarding conflicting type for 'strerror_r'. I edited filedial.c and filebuff.c to eliminate the error then cleaned and re-compiled.The compiler produced these files:libcgui.acgui21.dllThere were many warnings reported by the compiler but I did not try to correct those. I just allowed it complete compilation. In the 'examples' directory I tried to run some of the demonstration files. The first example 00hello.exe does not run, however 01hellox.exe does run. When an example program is started the window flashes for about 15 seconds as though trying to set video mode. Other examples with controls inside such as 10lists.exe and 22drag.exe function properly, however with long load time. Most of the examples will run (after long load). I liked the appearance and function of those examples.The extended load time is real a concern so I cannot use my compiled library files. If you have pre-built versions of libcgui.a and cgui21.dll please send them to me, I would like to try those for comparison. My last resort is go through the many compiler warnings and correct each of them individually. Best regards,Joe Reilly

    Please note: message attached

    From: "Christer Sandberg" chrisan@users.sourceforge.net
    To: "[cgui:bugs] " 109@bugs.cgui.p.re.sourceforge.net
    Subject: [cgui:bugs] Re: #109 #100 CGUI 2.1 does not build on Windows
    Date: Tue, 14 Feb 2023 21:08:13 -0000

     
    • Christer Sandberg

      Hello Joseph. That was good news. Well done!

      What kind of warnings were there? gcc version 4.8.4 gives no warnings on
      Linux. You can see the version number by command "gcc --version".

      Strange with the startup delay. A difference to the Linux system is the
      handling of dynamic libraries. Have you tried the static linked version?
      One can do that by running "make clean" and then "make STATICLINK=1".
      Alternatively you could test to change to a different initialization
      function in one of the examples, e.g. InitCguiWindowedMode(); and run
      make again.
      Have you used the pre-built Allegro lib or did you build it? If you have
      built it you could try to start one of allegro's examples to see if the
      startup problem is there.

      As I mentioned before I am entirely on Linux so there are no pre-built
      libraries for Windows. There is no other person than me active on CGUI for
      the moment.

      For some reason I needed to use strerror_r and apparently discovered that
      it is a POSIX function, not standard C, so I made a replacement
      implementation in case compiling on a non-UNIX system to make it get
      through the compilation. It seems that mingw has adopted the POSIX standard
      since then, therefore it conflicts with the implementation that I
      carelessly had defined with int as type for the third parameter instead of
      size_t.

      Best regards
      Christer

      Den ons 15 feb. 2023 kl 20:29 skrev Joseph Reilly jcr2023@users.sourceforge.net:

      Hello Christer,I made the edit to cgui.def and dllsyms.lst that you
      suggested and it eliminated the undefined reference error for
      'InsertIntoWinClip'. During compilation, there was one other error
      resulting in failure regarding conflicting type for 'strerror_r'. I edited
      filedial.c and filebuff.c to eliminate the error then cleaned and
      re-compiled.The compiler produced these files:libcgui.acgui21.dllThere were
      many warnings reported by the compiler but I did not try to correct those.
      I just allowed it complete compilation. In the 'examples' directory I tried
      to run some of the demonstration files. The first example 00hello.exe does
      not run, however 01hellox.exe does run. When an example program is started
      the window flashes for about 15 seconds as though trying to set video mode.
      Other examples with controls inside such as 10lists.exe and 22drag.exe
      function properly, however with long load time. Most of the examples will
      run (after long load). I liked the appearance and function of those
      examples.The extended load time is real a concern so I cannot use my
      compiled library files. If you have pre-built versions of libcgui.a and
      cgui21.dll please send them to me, I would like to try those for
      comparison. My last resort is go through the many compiler warnings and
      correct each of them individually. Best regards,Joe Reilly

      Please note: message attached

      From: "Christer Sandberg" chrisan@users.sourceforge.net
      To: "[cgui:bugs] " 109@bugs.cgui.p.re.sourceforge.net
      Subject: [cgui:bugs] Re: #109 #100 CGUI 2.1 does not build on Windows
      Date: Tue, 14 Feb 2023 21:08:13 -0000


      Status: open
      Group: v1.6.5
      Created: Tue Feb 14, 2023 02:51 AM UTC by Joseph Reilly
      Last Updated: Tue Feb 14, 2023 02:51 AM UTC
      Owner: nobody

      I am looking forward to using the CGUI library.
      However I receive this error message when building it:

      c:/users/joe/documents/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bi
      n/ld.exe: cgui21.exp:fake:(.edata+0x1f0): undefined reference to
      `InsertIntoWinC
      lip'
      collect2.exe: error: ld returned 1 exit status
      C:\Users\Joe\Documents\MinGW\bin\dllwrap.exe:
      C:\Users\Joe\Documents\MinGW\bin\g
      cc exited with status 1
      make: *** [lib/mingw32/cgui21.dll] Error 1

      (Note: this problem is similar to closed ticket #100.)
      Thank you for your assistance.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cgui/bugs/109/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Christer

       

      Related

      Bugs: #109

  • Joseph Reilly

    Joseph Reilly - 2023-02-16

    Hello Christer,
    I trust that your day is going well!
    I tried 'make STATICLINK=1' however it hit the error 'no such file or directory', which I don'tunderstand since environment variables MINGDIR, ALLEGRO, and paths are set properly.
    The Allegro library has worked with other graphics programs without extended delay or any otherproblem when loading. If I had more time available, I would research it further. CGUI dialogslook great and I like how the controls function. However I cannot put any more time into it.Maybe in the future I can re-visit CGUI and get it to run better on my operating system. Thanksfor your assistance and prompt response to this ticket.
    Best regards,
    Joe

    Please note: message attached

    From: "Christer Sandberg" chrisan@users.sourceforge.net
    To: "[cgui:bugs] " 109@bugs.cgui.p.re.sourceforge.net
    Subject: [cgui:bugs] Re: #109 #100 CGUI 2.1 does not build on Windows
    Date: Wed, 15 Feb 2023 22:31:26 -0000

     

Log in to post a comment.