Enclosed the Result of Command Execution.....
I think the problem is that Larry left out the source name in the command.
cob popup-app.cbl -xI COBWIN2 -o popup-app
where popup-app.cbl is the name of your application COBOL source file and popup-app is the name of the desired executable file that will include the required COBWIN2.
Note that if you already have the object file (for example, popup-app.o), you can just link in COBWIN2 with the following command:
cob popup-app.o -xI COBWIN2 -o popup-app
If there are multiple object files, just list them in place of popup-app.o in the above example.
After discovering that development was on Eclipse for Windows, this was answered in another copy of this thread topic as requiring the cbllink command to link in COBWIN2.obj. Further investigation shows there are other alternatives.
(1) When producing an EXE with Eclipse, a reference to COBWIN2.dll is automatically inserted in the EXE and the entry point CBL_OPEN_WINDOW will be found with the EXE is executed (presuming COBWIN2.dll can be found in the execution environment). As noted elsewhere, an EXE built on Windows is not portable to UNIX. If dynamic linking with a DLL is not desired, COBWIN2.obj can be linked into the executable by specifying it in the project properties Micro Focus / Build Configurations / COBOL / Link / Additional Link Files with the Add External Files ... button and navigating to the COBWIN2.obj in the Micro Focus installation.
(3) If portability to UNIX is desired, the Eclipse project can be set (in project properties Micro Focus / Build Configurations / COBOL / Target Settings / Target Type, choosing All Int/Gnt Files in the drop down list. The Int files can be moved to UNIX. However, note that 32 bit and 64 bit Int files cannot be intermixed. With Int files, the initcall(cobwin2) directive needs to be specified when using popup windows; this can be done in the project properties Micro Focus / Project Settings / COBOL / Additional directives: text box). Also, the ADISCTRL file has a different format on Windows and UNIX. For programs that were originally RM/COBOL, the RM2VCOB configuration needs to be selected in the ADISCTRL file (on Windows or UNIX). Similarly, for programs that were originally ACUCOBOL, the ACU2VCOB configuration needs to be selected. On UNIX, the adisctrl file is often in /etc and not writable; to change the default configuration (using the adiscf utility), it is generally best to copy the adisctrl file to your working directory as a writable copy and then choosing the RM2VCOB or ACU2VCOB configuration as the default, which requires rewriting the file.