Menu

Having issue with compiling, libcob.lib nt found

2024-01-16
2024-05-15
  • Josh Chatterjee

    Josh Chatterjee - 2024-01-16

    I was trying to install GNUcobol for windows using choco install gnucobol but I have been stuck on the final step. It hits me with this error:

    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find /LIBPATH:C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib: Invalid argument
    collect2.exe: error: ld returned 1 exit status
    

    I decided to use -v for more info but I am still a bit lost.

    cobc (GnuCOBOL) 3.2.0
    Built     Jul 28 2023 19:10:09  Packaged  Jul 28 2023 17:02:56 UTC
    C version (MinGW) "9.2.0"
    loading standard configuration file 'default.conf'
    command line:   C:\ProgramData\chocolatey\lib\gnucobol\tools\bin\cobc.exe -xv .\Helloworl.cbl
    .\Helloworl.cbl:1: note: free format detected
        1 > IDENTIFICATION DIVISION.
        2 | PROGRAM-ID. HELLO.
        3 | ENVIRONMENT DIVISION.
    preprocessing:  .\Helloworl.cbl -> C:\Users\catte\AppData\Local\Temp\cob18632_0.cob
    return status:  0
    parsing:        C:\Users\catte\AppData\Local\Temp\cob18632_0.cob (.\Helloworl.cbl)
    .\Helloworl.cbl:8: warning: optional period used [-Wdialect]
        6 |      DISPLAY "Hello World!"
        7 |      STOP RUN
        8 > <EOF>
    return status:  0
    translating:    C:\Users\catte\AppData\Local\Temp\cob18632_0.cob -> C:\Users\catte\AppData\Local\Temp\cob18632_0.c (.\Helloworl.cbl)
    executing:      gcc -c
                    -I"C:\ProgramData\chocolatey\lib\gnucobol\tools\include" -o
                    "C:\Users\catte\AppData\Local\Temp\cob18632_0.o"
                    "C:\Users\catte\AppData\Local\Temp\cob18632_0.c"
    return status:  0
    executing:      gcc -Wl,--export-all-symbols -Wl,--enable-auto-import
                    -Wl,--enable-auto-image-base -o "Helloworl.exe"
                    "C:\Users\catte\AppData\Local\Temp\cob18632_0.o"
                    /LIBPATH:"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib"
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find /LIBPATH:C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib: Invalid argument
    collect2.exe: error: ld returned 1 exit status
    return status:  1
    

    Any help is appreciated. :)

     

    Last edit: Simon Sobisch 2024-01-16
    • Simon Sobisch

      Simon Sobisch - 2024-01-16

      Somewhere in the setup there's an error. As this is a GCC build using ld.exe, there should be no /LIBPATH but instead -L.

      What is the output of cobc --info? Do you manually call a a batch script to do the setup and/or is this done in the choco package?

       
  • Josh Chatterjee

    Josh Chatterjee - 2024-01-16
    cobc (GnuCOBOL) 3.2.0
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
    Built     Jul 28 2023 19:10:09
    Packaged  Jul 28 2023 17:02:56 UTC
    C version (MinGW) "9.2.0"
    
    build information
    build environment        : i686-pc-mingw32
    CC                       : gcc
    C version                : (MinGW) "9.2.0"
    CPPFLAGS                 : -I/mingw/include
    CFLAGS                   : -O2 -pipe -finline-functions -fsigned-char
                               -Wall -Wwrite-strings -Wmissing-prototypes
                               -Wno-format-y2k
    LD                       : c:/mingw/mingw32/bin/ld.exe
    LDFLAGS                  :
    
    GnuCOBOL information
    COB_CC                   : gcc
    COB_CFLAGS               : -pipe -I/mingw/include -I/mingw/include
                               -Wno-unused -fsigned-char -Wno-pointer-sign
      env: COB_CFLAGS        : -I"C:\ProgramData\chocolatey\lib\gnucobol\tools\include"
    COB_DEBUG_FLAGS          : -ggdb3 -fasynchronous-unwind-tables
    COB_LDFLAGS              :
    COB_LIBS                 : -L/mingw/lib -lcob
      env: COB_LIBS          : /LIBPATH:"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib"
    COB_CONFIG_DIR           : /mingw/share/gnucobol/config
      env: COB_CONFIG_DIR    : C:\ProgramData\chocolatey\lib\gnucobol\tools\config
    COB_COPY_DIR             : /mingw/share/gnucobol/copy
    COB_MSG_FORMAT           : GCC
    COB_OBJECT_EXT           : o
    COB_MODULE_EXT           : dll
    COB_EXE_EXT              : exe
    64bit-mode               : no
    BINARY-C-LONG            : 4 bytes
    endianness               : little-endian
    native EBCDIC            : no
    extended screen I/O      : pdcurses
    variable file format     : 0
    sequential file handler  : built-in
    indexed file handler     : BDB
    mathematical library     : GMP
    XML library              : disabled
    JSON library             : cjson
    

    I am using windows so choco calls a PowerShell script automatically as far as I know.

     

    Last edit: Josh Chatterjee 2024-01-16
  • Simon Sobisch

    Simon Sobisch - 2024-01-16

    You should check with the choco maintainer - the environment variable set is wrong.
    Actually you can do where cobc which should very likely get you to the file that needs a change from /LIBPATH: to -L.

     
  • Josh Chatterjee

    Josh Chatterjee - 2024-01-16
    $packageName= 'GnuCOBOL'
    $distDir    = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    $url        = 'https://arnoldtrembley.com/GC32-BDB-SP1-rename-7z-to-exe.7z'
    
    $packageArgs = @{
      packageName   = $packageName
      unzipLocation = $distDir
      fileType      = 'exe'
      url           = $url
    
      softwareName  = 'GnuCOBOL*'
    
      checksum      = '7A2FC087A83B14E2F2B08F2393A0CA713529A42D0292144D2FB909242132BC95'
      checksumType  = 'sha256'
    }
    
    Install-ChocolateyZipPackage @packageArgs
    
    $files = Get-ChildItem $($distDir) -Include *.exe -Exclude cobc.exe,cobcrun.exe -Recurse
    foreach ($file in $files) {
      # We only want to shim cobc and cobcrun.
      New-Item "$file.ignore" -type file -force | Out-Null
    }
    
    Install-ChocolateyEnvironmentVariable -VariableName "COB_CONFIG_DIR" -VariableValue "$($distDir)\config"
    Install-ChocolateyEnvironmentVariable -VariableName "COB_CFLAGS" -VariableValue "-I`"$($distDir)\include`""
    Install-ChocolateyEnvironmentVariable -VariableName "COB_LIBRARY_PATH" -VariableValue "/LIBPATH:`"$($distDir)\lib`""
    Install-ChocolateyEnvironmentVariable -VariableName "COB_LIBS" -VariableValue "/LIBPATH:`"$($distDir)\lib\libcob.lib`""
    

    Did a bit of snooping around and I found the script that chocolatey runs on install.

     

    Last edit: Josh Chatterjee 2024-01-16
    • Simon Sobisch

      Simon Sobisch - 2024-01-16

      change the (user) environment variables:

      • COB_LIBS should be replaced to have `-lcob,
      • in COB_LIBRARY_PATH replace /LIBPATH: by -L

      I guess you need to do a restart afterwards, then recheck - if this works then please pass this information to the choco package maintainer.

       
  • Josh Chatterjee

    Josh Chatterjee - 2024-01-16

    At least the error is different

    cobc (GnuCOBOL) 3.2.0
    Built     Jul 28 2023 19:10:09  Packaged  Jul 28 2023 17:02:56 UTC
    C version (MinGW) "9.2.0"
    loading standard configuration file 'default.conf'
    command line:   C:\ProgramData\chocolatey\lib\gnucobol\tools\bin\cobc.exe -xv .\Helloworl.cbl
    .\Helloworl.cbl:1: note: free format detected
        1 > IDENTIFICATION DIVISION.
        2 | PROGRAM-ID. HELLO.
        3 | ENVIRONMENT DIVISION.
    preprocessing:  .\Helloworl.cbl -> C:\Users\catte\AppData\Local\Temp\cob6108_0.cob
    return status:  0
    parsing:        C:\Users\catte\AppData\Local\Temp\cob6108_0.cob (.\Helloworl.cbl)
    .\Helloworl.cbl:8: warning: optional period used [-Wdialect]
        6 |      DISPLAY "Hello World!"
        7 |      STOP RUN
        8 > <EOF>
    return status:  0
    translating:    C:\Users\catte\AppData\Local\Temp\cob6108_0.cob -> C:\Users\catte\AppData\Local\Temp\cob6108_0.c (.\Helloworl.cbl)
    executing:      gcc -c
                    -I"C:\ProgramData\chocolatey\lib\gnucobol\tools\include" -o
                    "C:\Users\catte\AppData\Local\Temp\cob6108_0.o"
                    "C:\Users\catte\AppData\Local\Temp\cob6108_0.c"
    return status:  0
    executing:      gcc -Wl,--export-all-symbols -Wl,--enable-auto-import
                    -Wl,--enable-auto-image-base -o "Helloworl.exe"
                    "C:\Users\catte\AppData\Local\Temp\cob6108_0.o"
                    -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib"
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x20): undefined reference to `__imp_cob_init'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x30): undefined reference to `__imp_cob_stop_run'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x5c): undefined reference to `__imp_cob_check_version'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0xfb): undefined reference to `__imp_cob_module_global_enter'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x189): undefined reference to `__imp_cob_display'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x19a): undefined reference to `__imp_cob_stop_run'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x2c2): undefined reference to `__imp_cob_set_cancel'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob6108_0.o:cob6108_0.c:(.text+0x31d): undefined reference to `__imp_cob_fatal_error'
    collect2.exe: error: ld returned 1 exit status
    return status:  1
    
     

    Last edit: Josh Chatterjee 2024-01-16
  • Simon Sobisch

    Simon Sobisch - 2024-01-16

    It looks like COB_LIBS isn't -lcob...
    In any case change -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libcob.lib" to -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib", and if it still doesn't work while COB_LIBS is set, then add -lcob to that list.

     
  • Josh Chatterjee

    Josh Chatterjee - 2024-01-17

    Getting a different error now

    obc (GnuCOBOL) 3.2.0
    Built     Jul 28 2023 19:10:09  Packaged  Jul 28 2023 17:02:56 UTC
    C version (MinGW) "9.2.0"
    loading standard configuration file 'default.conf'
    command line:   C:\ProgramData\chocolatey\lib\gnucobol\tools\bin\cobc.exe -xv .\Helloworl.cbl
    preprocessing:  .\Helloworl.cbl -> C:\Users\catte\AppData\Local\Temp\cob7844_0.cob
    return status:  0
    parsing:        C:\Users\catte\AppData\Local\Temp\cob7844_0.cob (.\Helloworl.cbl)
    return status:  0
    translating:    C:\Users\catte\AppData\Local\Temp\cob7844_0.cob -> C:\Users\catte\AppData\Local\Temp\cob7844_0.c (.\Helloworl.cbl)
    executing:      gcc -c
                    -I"C:\ProgramData\chocolatey\lib\gnucobol\tools\include" -o
                    "C:\Users\catte\AppData\Local\Temp\cob7844_0.o"
                    "C:\Users\catte\AppData\Local\Temp\cob7844_0.c"
    return status:  0
    executing:      gcc -Wl,--export-all-symbols -Wl,--enable-auto-import
                    -Wl,--enable-auto-image-base -o "Helloworl.exe"
                    "C:\Users\catte\AppData\Local\Temp\cob7844_0.o"
                    -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib"
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmingw32.a when searching for -lmingw32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmingw32.a when searching for -lmingw32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmoldname.a when searching for -lmoldname
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmoldname.a when searching for -lmoldname
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmingwex.a when searching for -lmingwex
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmingwex.a when searching for -lmingwex
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmsvcrt.a when searching for -lmsvcrt
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmsvcrt.a when searching for -lmsvcrt
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libkernel32.a when searching for -lkernel32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libkernel32.a when searching for -lkernel32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libadvapi32.a when searching for -ladvapi32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libadvapi32.a when searching for -ladvapi32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libshell32.a when searching for -lshell32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libshell32.a when searching for -lshell32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libuser32.a when searching for -luser32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libuser32.a when searching for -luser32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libkernel32.a when searching for -lkernel32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libkernel32.a when searching for -lkernel32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmingw32.a when searching for -lmingw32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmingw32.a when searching for -lmingw32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmoldname.a when searching for -lmoldname
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmoldname.a when searching for -lmoldname
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmingwex.a when searching for -lmingwex
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmingwex.a when searching for -lmingwex
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libmsvcrt.a when searching for -lmsvcrt
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libmsvcrt.a when searching for -lmsvcrt
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib/libkernel32.a when searching for -lkernel32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\ProgramData\chocolatey\lib\gnucobol\tools\lib\libkernel32.a when searching for -lkernel32
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x20): undefined reference to `__imp_cob_init'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x30): undefined reference to `__imp_cob_stop_run'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x5c): undefined reference to `__imp_cob_check_version'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0xfb): undefined reference to `__imp_cob_module_global_enter'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x189): undefined reference to `__imp_cob_display'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x19a): undefined reference to `__imp_cob_stop_run'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x2c2): undefined reference to `__imp_cob_set_cancel'
    C:/ProgramData/mingw64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\catte\AppData\Local\Temp\cob7844_0.o:cob7844_0.c:(.text+0x31d): undefined reference to `__imp_cob_fatal_error'
    collect2.exe: error: ld returned 1 exit status
    return status:  1
    
     

    Last edit: Josh Chatterjee 2024-01-17
  • Chuck Haatvedt

    Chuck Haatvedt - 2024-01-17

    Josh,

    perhaps an easier option would be to download a binary archive from Arnold Trumbley's website that you can just expand and use...

    https://www.arnoldtrembley.com/GC32-BDB-SP1-rename-7z-to-exe.7z

    go to this page for installation instructions..

    https://www.arnoldtrembley.com/GnuCOBOL.htm

    Here are the newest GnuCOBOL 3.2 (28Jul2023) download binaries built with MinGW Gnu Compiler Collection 9.2.0. These binaries have been updated as of 13Aug2023 to include the most recent updates to the GnuCOBOL manuals, which are included in PDF format. GnuCOBOL 3.2 includes PDCursesMod 4.3.7/wincon. It also includes GCSORT.EXE and support for the COBOL ReportWriter. You can download a 7-Zip binary and rename the file extension from "7z" to "exe", and run it as a self-installing archive. Then see the STARTHERE.txt file, or open a cmd.exe window in the install folder, and run "set_env.cmd" to set the environment variables.

     
  • Chuck Haatvedt

    Chuck Haatvedt - 2024-01-17

    Josh,

    you can find me on Skype if you have access to that, my user name is chuck.haatvedt

    or send me a message and I could setup a meeting to help you get started.

     
  • Josh Chatterjee

    Josh Chatterjee - 2024-01-17

    Sure. Mr Chuck H. I have classes now but I will check it out and see if i can fix this issue.

     

    Last edit: Josh Chatterjee 2024-01-17
  • Simon Sobisch

    Simon Sobisch - 2024-01-17

    Rechecked the (edited?) post above:

    • likely missing - check with cobc --info: have COB_LIBS with the value -lcob
    • COB_LIB_PATH, should point to the library path, prefixed by -L just as it was in your example above (installed -L"C:\ProgramData\chocolatey\lib\gnucobol\tools\lib")
    • COB_LIBRARY_PATH, which is a directory listing of default lookup paths, should point to where CBL_OC_DUMP.dll is, I guess that would be $($distDir)\extras

    @chaat: the choco install is thought to "just work" and should be made that way by fixing the local choco installation, then check back with the choco packaga maintainer.

     
  • Cthulhux

    Cthulhux - 2024-05-15

    Back in my day, people actually notified the maintainers...

    Anyway: I fixed the Chocolatey package. Thank you for being involved to everyone who helped!

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.