Menu

hey guys weird behavior

J McNamara
2024-10-19
2024-10-20
  • J McNamara

    J McNamara - 2024-10-19

    $> ./configure -CFLAGS=-ncurses
    configure: error: unrecognized option: '-CFLAGS=-ncurses'
    $> ./configure --with-PACKAGE=ncurses
    nothing works
    ./cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
    bash: ./cob-config: No such file or directory
    cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
    -L/usr/local/lib -lcob
    Usage: cob-config [options]

    echos configuration variables of libcob (GnuCOBOL).

    Options:
    --prefix echos the package-prefix of libcob (GnuCOBOL)
    --exec-prefix echos the executable-prefix of libcob (GnuCOBOL)

    --cflags echos the C compiler flags needed to compile with libcob (GnuCOBOL)
    --libs echos the libraries needed to link with libcob (GnuCOBOL)

    --version echos the release+patchdate version of libcob (GnuCOBOL)

    --bindir echos the directory containing libcob (GnuCOBOL) programs
    --datarootdir echos the data root for libcob (GnuCOBOL)
    --datadir echos the directory containing libcob (GnuCOBOL) data
    --includedir echos the directory containing libcob (GnuCOBOL) header files
    --libdir echos the directory containing libcob (GnuCOBOL) libraries
    --mandir echos the directory containing libcob (GnuCOBOL) manpages

    --help prints this message

    any way to tell this thing to use ncurses or get confirmation in ./configure that it is using ncurses

    thanks

    Sent with Proton Mail secure email.

     
    • J McNamara

      J McNamara - 2024-10-19

      gcc -std=gnu99 -Wl,--export-dynamic -o "init.o" -L/usr/local/lib -lcob -lm -lgmp -lncursesw -ldl

      Sent with Proton Mail secure email.

      HI all-

      I see where you can do something like this ...

      after cobc.exe -x init.cob

      I just have to figure out winmain now.

      thanks
      ------- Forwarded Message -------
      From: J McNamara masticon@users.sourceforge.net
      Date: On Saturday, October 19th, 2024 at 2:32 PM
      Subject: [gnucobol:discussion] hey guys weird behavior
      To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net

      $> ./configure -CFLAGS=-ncurses
      configure: error: unrecognized option: '-CFLAGS=-ncurses'
      $> ./configure --with-PACKAGE=ncurses
      nothing works
      ./cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
      bash: ./cob-config: No such file or directory
      cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
      -L/usr/local/lib -lcob
      Usage: cob-config [options]

      echos configuration variables of libcob (GnuCOBOL).

      Options:
      --prefix echos the package-prefix of libcob (GnuCOBOL)
      --exec-prefix echos the executable-prefix of libcob (GnuCOBOL)

      --cflags echos the C compiler flags needed to compile with libcob (GnuCOBOL)
      --libs echos the libraries needed to link with libcob (GnuCOBOL)

      --version echos the release+patchdate version of libcob (GnuCOBOL)

      --bindir echos the directory containing libcob (GnuCOBOL) programs
      --datarootdir echos the data root for libcob (GnuCOBOL)
      --datadir echos the directory containing libcob (GnuCOBOL) data
      --includedir echos the directory containing libcob (GnuCOBOL) header files
      --libdir echos the directory containing libcob (GnuCOBOL) libraries
      --mandir echos the directory containing libcob (GnuCOBOL) manpages

      --help prints this message

      any way to tell this thing to use ncurses or get confirmation in ./configure that it is using ncurses

      thanks

      Sent with Proton Mail secure email.


      hey guys weird behavior


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

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

       
      • J McNamara

        J McNamara - 2024-10-19

        I have more feedback...

        If i run this scenario something works and the latter scenario referrence to winmain unknown

        here it goes..
        IDENTIFICATION DIVISION.
        PROGRAM-ID. MyProgram.
        ENVIRONMENT DIVISION.
        DATA DIVISION.
        WORKING-STORAGE SECTION.
        01 WS-VAR PIC X(10) VALUE "Hello!".
        PROCEDURE DIVISION.
        MAIN-PROCEDURE.
        DISPLAY WS-VAR.
        STOP RUN.$> cobc -x -o my_program baseball.cob $(pkg-config --cflags --libs ncurses)
        $> ./my_program.exeHello!

        but like this...

        cobc -x baseball.cob
        $> gcc -std=gnu99 -Wl,--export-dynamic -o "baseball.o" -L/usr/local/lib -lcob -lm -lgmp -lncursesw -ldl
        /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
        /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/13/../../../libcygwin.a(libcmain.o): in function main': /usr/src/debug/cygwin-3.5.4-1/winsup/cygwin/lib/libcmain.c:37:(.text.startup+0x79): undefined reference toWinMain'collect2: error: ld returned 1 exit status

        IDENTIFICATION DIVISION.
        PROGRAM-ID. NcursesExample.

        ENVIRONMENT DIVISION.

        DATA DIVISION.
        WORKING-STORAGE SECTION.
        01 WS-RETURN-CODE PIC S9(9) COMP.

        PROCEDURE DIVISION.
        MAIN-PROCEDURE.

        CALL 'initscr' USING WS-RETURN-CODE.

        IF WS-RETURN-CODE < 0
        DISPLAY "Failed to initialize ncurses."
        ELSE
        DISPLAY "Ncurses initialized successfully."
        END-IF.

        CALL 'refresh'.
        CALL 'getch'.
        CALL 'endwin'.

        STOP RUN.

        Hello!
        $> cobc -x -o my_program init.cob $(pkg-config --cflags --libs ncurses)
        $> ./my_program.exelibcob: error: module 'initscr' not found

        so the one with the calls i can't to work.

        sorry guys, i'm taking a break.

        later

        Sent with Proton Mail secure email.

        ------- Forwarded Message -------
        From: J McNamara masticon@users.sourceforge.net
        Date: On Saturday, October 19th, 2024 at 2:56 PM
        Subject: [gnucobol:discussion] Re: hey guys weird behavior
        To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net

        gcc -std=gnu99 -Wl,--export-dynamic -o "init.o" -L/usr/local/lib -lcob -lm -lgmp -lncursesw -ldl

        Sent with Proton Mail secure email.

        HI all-

        I see where you can do something like this ...

        after cobc.exe -x init.cob

        I just have to figure out winmain now.

        thanks
        ------- Forwarded Message -------
        From: J McNamara masticon@users.sourceforge.net
        Date: On Saturday, October 19th, 2024 at 2:32 PM
        Subject: [gnucobol:discussion] hey guys weird behavior
        To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net

        $> ./configure -CFLAGS=-ncurses
        configure: error: unrecognized option: '-CFLAGS=-ncurses'
        $> ./configure --with-PACKAGE=ncurses
        nothing works
        ./cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
        bash: ./cob-config: No such file or directory
        cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
        -L/usr/local/lib -lcob
        Usage: cob-config [options]

        echos configuration variables of libcob (GnuCOBOL).

        Options:
        --prefix echos the package-prefix of libcob (GnuCOBOL)
        --exec-prefix echos the executable-prefix of libcob (GnuCOBOL)

        --cflags echos the C compiler flags needed to compile with libcob (GnuCOBOL)
        --libs echos the libraries needed to link with libcob (GnuCOBOL)

        --version echos the release+patchdate version of libcob (GnuCOBOL)

        --bindir echos the directory containing libcob (GnuCOBOL) programs
        --datarootdir echos the data root for libcob (GnuCOBOL)
        --datadir echos the directory containing libcob (GnuCOBOL) data
        --includedir echos the directory containing libcob (GnuCOBOL) header files
        --libdir echos the directory containing libcob (GnuCOBOL) libraries
        --mandir echos the directory containing libcob (GnuCOBOL) manpages

        --help prints this message

        any way to tell this thing to use ncurses or get confirmation in ./configure that it is using ncurses

        thanks

        Sent with Proton Mail secure email.


        hey guys weird behavior


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

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


        hey guys weird behavior


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

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

         
        • Simon Sobisch

          Simon Sobisch - 2024-10-20

          There is a flag like -fwinmain or similar (just try or check cobc/flags.def).

          Am 19. Oktober 2024 21:17:26 MESZ schrieb J McNamara masticon@users.sourceforge.net:

          I have more feedback...

          If i run this scenario something works and the latter scenario referrence to winmain unknown

          here it goes..
          IDENTIFICATION DIVISION.
          PROGRAM-ID. MyProgram.
          ENVIRONMENT DIVISION.
          DATA DIVISION.
          WORKING-STORAGE SECTION.
          01 WS-VAR PIC X(10) VALUE "Hello!".
          PROCEDURE DIVISION.
          MAIN-PROCEDURE.
          DISPLAY WS-VAR.
          STOP RUN.$> cobc -x -o my_program baseball.cob $(pkg-config --cflags --libs ncurses)
          $> ./my_program.exeHello!

          but like this...

          cobc -x baseball.cob
          $> gcc -std=gnu99 -Wl,--export-dynamic -o "baseball.o" -L/usr/local/lib -lcob -lm -lgmp -lncursesw -ldl
          /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?
          /usr/lib/gcc/x86_64-pc-cygwin/13/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/13/../../../libcygwin.a(libcmain.o): in function main': /usr/src/debug/cygwin-3.5.4-1/winsup/cygwin/lib/libcmain.c:37:(.text.startup+0x79): undefined reference toWinMain'collect2: error: ld returned 1 exit status

          IDENTIFICATION DIVISION.
          PROGRAM-ID. NcursesExample.

          ENVIRONMENT DIVISION.

          DATA DIVISION.
          WORKING-STORAGE SECTION.
          01 WS-RETURN-CODE PIC S9(9) COMP.

          PROCEDURE DIVISION.
          MAIN-PROCEDURE.

          CALL 'initscr' USING WS-RETURN-CODE.

          IF WS-RETURN-CODE < 0
          DISPLAY "Failed to initialize ncurses."
          ELSE
          DISPLAY "Ncurses initialized successfully."
          END-IF.

          CALL 'refresh'.
          CALL 'getch'.
          CALL 'endwin'.

          STOP RUN.

          Hello!
          $> cobc -x -o my_program init.cob $(pkg-config --cflags --libs ncurses)
          $> ./my_program.exelibcob: error: module 'initscr' not found

          so the one with the calls i can't to work.

          sorry guys, i'm taking a break.

          later

          Sent with Proton Mail secure email.

          ------- Forwarded Message -------
          From: J McNamara masticon@users.sourceforge.net
          Date: On Saturday, October 19th, 2024 at 2:56 PM
          Subject: [gnucobol:discussion] Re: hey guys weird behavior
          To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net

          gcc -std=gnu99 -Wl,--export-dynamic -o "init.o" -L/usr/local/lib -lcob -lm -lgmp -lncursesw -ldl

          Sent with Proton Mail secure email.

          HI all-

          I see where you can do something like this ...

          after cobc.exe -x init.cob

          I just have to figure out winmain now.

          thanks
          ------- Forwarded Message -------
          From: J McNamara masticon@users.sourceforge.net
          Date: On Saturday, October 19th, 2024 at 2:32 PM
          Subject: [gnucobol:discussion] hey guys weird behavior
          To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net

          $> ./configure -CFLAGS=-ncurses
          configure: error: unrecognized option: '-CFLAGS=-ncurses'
          $> ./configure --with-PACKAGE=ncurses
          nothing works
          ./cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
          bash: ./cob-config: No such file or directory
          cob-config --libs -L/usr/local/lib -lcob -lm -lgmp -lncurses -ldb -ocesql
          -L/usr/local/lib -lcob
          Usage: cob-config [options]

          echos configuration variables of libcob (GnuCOBOL).

          Options:
          --prefix echos the package-prefix of libcob (GnuCOBOL)
          --exec-prefix echos the executable-prefix of libcob (GnuCOBOL)

          --cflags echos the C compiler flags needed to compile with libcob (GnuCOBOL)
          --libs echos the libraries needed to link with libcob (GnuCOBOL)

          --version echos the release+patchdate version of libcob (GnuCOBOL)

          --bindir echos the directory containing libcob (GnuCOBOL) programs
          --datarootdir echos the data root for libcob (GnuCOBOL)
          --datadir echos the directory containing libcob (GnuCOBOL) data
          --includedir echos the directory containing libcob (GnuCOBOL) header files
          --libdir echos the directory containing libcob (GnuCOBOL) libraries
          --mandir echos the directory containing libcob (GnuCOBOL) manpages

          --help prints this message

          any way to tell this thing to use ncurses or get confirmation in ./configure that it is using ncurses

          thanks

          Sent with Proton Mail secure email.


          hey guys weird behavior


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

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


          hey guys weird behavior


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

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


          hey guys weird behavior


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gnucobol/discussion/help/

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

           
  • Chuck Haatvedt

    Chuck Haatvedt - 2024-10-19

    J McNamara,

    Are you trying to build the GNUCOBOL compiler from source code ?

    if so, I can send you a script that I use to build it using the MSYS2 build environment.

    Chuck Haatvedt

    ps... my SKYPE name is chuck.haatvedt and I'm usually available there as well for online assistance.

     

Anonymous
Anonymous

Add attachments
Cancel