Menu

dbpre on windows

Anonymous
2015-01-03
2015-01-13
  • Anonymous

    Anonymous - 2015-01-03

    Hi Piper,
    Just wanted to know if you have tested this on windows. I am trying to get it working on windows using the cygwin compilers but am gettin issues. Also I am trying to get it included in an IDE developed by another person, How do you feel about it. For the IDE you can refer to:
    https://github.com/OpenCobolIDE/OpenCobolIDE

     
    • The_Piper

      The_Piper - 2015-01-13

      No, i haven't tried to get it run using Windows, i am a Linux user.
      But basically it should run under Windows, if you have GnuCobol and MySql installed (read Simon's Post below).

       
  • Anonymous

    Anonymous - 2015-01-11

    I want to use dbpre on windows 7 with mingw und ms visual studio too.
    I could not compile dbpre.c either with mingw or visual studio.

     
    • The_Piper

      The_Piper - 2015-01-13

      Read Simon's post below, to compile the precompiler you need both GnuCobol and MySql installed, since the API file dbpre uses, accesses of course both GnuCobol and MySql.

       
  • beggy

    beggy - 2015-01-11

    I wish, that dbpre from Gnu Cobol would run on windows 7 with mingw or ms visual studio.
    Could you help me, how to compile the tool on windows 7.
    This could be preferrable, why OpenCobolIde with the last release support this possibility. Regretfully the support does not exist on windows 7.

     
    • Simon Sobisch

      Simon Sobisch - 2015-01-11

      I don't see any reason why it shouldn't work :-)

      ... as long as you have a mysql development running (headers and libmysqlclient/mysqlclient.lib needed).

      For compiling in MinGW you can use the scripts available

      ::bash
      ./cAPI      # compile API; may need to change folder for mysql header + library
      ./c         # compile and install dbpre; may need to remove the "sudo "
      ./cPCTB003B # compile sample using dbpre to check if everything works
      

      If you want to compile with visual studio then just open the VS command prompt and use the same compile steps (untested but should work or at least give the picture)

      ::bat
      :: compile API; likely need to change folder for mysql header
      cl -IC:\mysql\include -c cobmysqlapi.c
      
      :: compile dbpre
      cl dbpre.c -o dbpre.exe
      
      :: compile sample using dbpre to check if everything works; likely need to change folder for mysql library
      dbpre PCTB003B -ts=3 -I./
      cobc -x PCTB003B.cob cobmysqlapi.o -LC:\mysql\lib -lmysqlclient
      

      Simon

       

Anonymous
Anonymous

Add attachments
Cancel