Menu

window 11

2023-01-23
2023-01-28
  • julius turner

    julius turner - 2023-01-23

    how do I install gnucobol on windows 11
    my son is helping me and we followed the procedures and it did not work.
    could you do a youtube on how to install of gnucobol on wi n 11

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-23

      I'm not sure how much a video would help. Let's got with text instructions first, here's the minimal install instruction.

      If you want a relative new COBOL-centric IDE to work with a pre-configured GnuCOBOL: Download, install and use
      Gix-IDE-windows-x64-installer.exe from https://github.com/mridoni/gix/releases, check out its documentation to know more about the IDE.

      If you don't want that IDE and a bit more configuration options:

      • Download https://www.arnoldtrembley.com/GC32-BDB-rc1-rename-7z-to-exe.7z
      • extract
        • option 1:
          • rename that from ".7z" to ".exe"
          • double click
          • as this download is new: click in the security popup to "more information 'link'", then on the "execute" button
          • decide on a folder where to extract the files to (for example "D:\dev\GnuCOBOL") and press "OK"
        • option 2:
          • double click the file which opens it with 7z (only if you have that installed, obviously)
          • extract all files to a folder of your choice
      • open this folder in the explorer
      • right click on "set_env.cmd" -> More Options -> Send to -> Desktop (as shortcut)
      • rename the shortcut o your desktop to "GnuCOBOL command prompt"


      Done. You can now double click on it and type pushd X:\Some\folder && cobc -x prog.cob to compile "prog.cob" in "X:\Some\folder" as executable "prog.exe". When you want to execute that later either start the GnuCOBOL command prompt again, then execute it, or add the contained "bin" folder to your PATH variable (If you aren't familiar what this means: don't do it), or "drag and drop" your "prog.exe" on the GnuCOBOL command prompt shortcut.

      You possibly want to have a look in the extracted folder at STARTHERE.txt as well as GnuCOBOL 3.2 Manual.pdf and the "docs" folder.

      Note: for a "nice IDE" setup with this GnuCOBOL package you may want to install VSCodium along with a COBOL extension and some build task setup, this way you only need to open it, open your source, get a nice highlighting and other editing features, execute "build", ...

       
  • Arnold Trembley

    Arnold Trembley - 2023-01-23

    In Windows 11, I believe the default setting is to HIDE filename extensions in Windows file explorer, which will make it difficult and confusing trying to rename the filename extension from .7z to .exe.

    Here is a link that will help with that:
    https://fileinfo.com/help/windows_11_show_file_extensions

    In my opinion, it is better to have Windows always display filename extensions for known file types, because Windows uses the filename extension to identify which programs can interact with specific files. For example, if clicked in windows file explorer, anything with a .htm or .html extension will automatically be opened in the default web browser. A .docx file will automatically be opened by MS Word (or LibreOffice/OpenOffice Writer, depending on your default programs setting). If filename extensions are always hidden you could have two identical filenames in the same folder, but one might be an MS Word file with a .docx extension, and one might be an executable file with an extension of .exe or .msi or .vbs (and possibly be malware).

    Of course, this is also a matter of personal preference about the way you like to customize your Windows environment.

    Kind regards,

     

    Last edit: Arnold Trembley 2023-01-23
  • Simon Sobisch

    Simon Sobisch - 2023-01-23

    Arnold is correct, so to rename the file without showing the extension you'd have to open the command prompt (is that "right click in the folder, then "open terminal here" in win11 or still ""open powershell" / "open command prompt"?) , then do that on the command line:

    move GC32-BDB-rc1-rename-7z-to-exe.7z GC32-BDB-rc1.exe
    
     
  • Anonymous

    Anonymous - 2023-01-27

    I found that is better to use GNU COBOL in WSL:
    https://learn.microsoft.com/en-us/windows/wsl/install
    https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW

    You can easily install WSL and Ubuntu 22.04 from Microsoft store.

    Also, to edit COBOL is far better to use VS Code with one of the many COBOL plugins:
    https://marketplace.visualstudio.com/search?term=COBOL&target=VSCode&category=All%20categories&sortBy=Relevance

    To edit files in WSL install the WSL plugin.

     
    • Simon Sobisch

      Simon Sobisch - 2023-01-28

      Using GnuCOBOL in WS2L is definitely running faster than "native", one of the reasons is that there are no windows services "interfering" with the compilation and running, another is that there are newer dependencies in use (but MSYS2 generated packages commonly use the newest components at time of creation).

      You could either run vscode from within WSL2 or on the Windows side with this setup, but I'd highly suggest to use a free build like VSCodium instead of the Microsoft binaries from Visual Studio Code and the open-remote-ssh extension instead of Microsoft's WSL extensions - because the Microsoft binaries "phone home" by default and possibly do other nasty things the "plain free vscode" doesn't do and use one of the free COBOL plugins, either from https://open-vsx.org/?search=cobol (that' what you get when searching extensions inside VSCodium, GitPod or other non-microsoft vscode builds).

      ... but: you'd need to do an wsl cobcrun yourprog instead of set_env.cmd cobcrun yourprog to execute it (ok, no big difference, you may jsut create a covrun.cmd wrapper which is in your PATH and executes either he wsl or the "native" builds) .
      But: the initial start of wsl takes definitively much more time than starting a "native" program.

       

      Last edit: Simon Sobisch 2023-01-28

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.