Menu

gnucobol , msys2 , mingw and PostgreSQL

2022-01-20
2022-01-20
  • celsofigueiredo

    celsofigueiredo - 2022-01-20

    Dear.

    I went to perform the postgreSQL DBsample example, but it gave the error below; What did I do wrong?

    PS C:\cobol\DBsample\PostgreSQL\example1> .\win_mingw_compile1.cmd

    Setting environment for GnuCOBOL 3.1.2 (23Dec2020) with MinGW binaries
    (GCC 6.3.0, PDcursesMod 4.2.0, GMP 6.2.0, BDB 18.1.40)

    cobc (GnuCOBOL) 3.1.2.0
    Copyright (C) 2020 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 Dec 26 2020 16:13:04
    Packaged Dec 23 2020 12:04:58 UTC
    C version (MinGW) "6.3.0"
    precompile start: PGMOD1.cbl
    =======================================================
    LIST OF CALLED DB Library API
    =======================================================
    Generate:OCESQLConnect
    Generate:OCESQLDisconnect
    =======================================================
    Press any key to continue...
    Pressione qualquer tecla para continuar. . .
    C:\gnucobol_prog\msys2-64bit-psql-ocesql\Open-COBOL-ESQL-1.2\dblib\ocdb.o: file not recognized: File format not recognized
    collect2.exe: error: ld returned 1 exit status
    PS C:\cobol\DBsample\PostgreSQL\example1>

     
  • Simon Sobisch

    Simon Sobisch - 2022-01-20

    OK, we seem to be talking about https://sourceforge.net/p/gnucobol/contrib/HEAD/tree/trunk/samples/DBsample/PostgreSQL/

    From the error message: the compile of Open-COBOL-ESQL-1.2 was not done with the same compiler as the PG example.

    Ensure that you use the same for both.

     

Anonymous
Anonymous

Add attachments
Cancel