Menu

#959 Windows 11 COBC called from .BAT file with multiple parameters

unclassified
not-our-bug
nobody
None
3
2024-03-28
2024-03-28
No

Hello,
I created 3 bat files for cobc to syntax check, compile to EXE and compile to DLL. I am only defining a maximum of 4 parameters right now but I think it can go to 9. The syntax check and the compile to DLL work fine. The compile to EXE compiles only the first program named in the list from a command prompt.
I want to compile over 20 programs at a time but they may not always be the same ones, so I am passing those I need at the current time. Zip file is attached with details and 3 small dummy programs.
Thanks, Vince

1 Attachments

Discussion

  • Arnold Trembley

    Arnold Trembley - 2024-03-28

    Your cx.bat file looks like this:

    rem @echo off
    rem Create EXE
    cobc -x -O2 %1 %2 %3 %4

    I could be wrong, but I suspect cobc assumes when using -x that you want to compile four separate programs into a single load module.

    What happens if you change cx.bat to look like this?

    rem @echo off
    rem Create EXE
    cobc -x -O2 %1
    cobc -x -O2 %2
    cobc -x -O2 %3
    cobc -x -O2 %4

    I assume you want four separate .exe files created, yes?

     
  • Vince Esparza

    Vince Esparza - 2024-03-28

    Yes. I want 4 separate EXE files. Let me try that.

     
  • Vince Esparza

    Vince Esparza - 2024-03-28

    Please close this ticket as a non-bug. Using separate lines worked.
    And now I know how to create on EXE with multiple CALLed sub-programs. : - )
    Thanks! Vince

     
  • Simon Sobisch

    Simon Sobisch - 2024-03-28
    • status: open --> not-our-bug
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.