Highlighted
Absent Member.
Absent Member.
1571 views

GET cob compiler and linker command line from Eclipse

Jump to solution

I am new to use Visual COBOL Eclipse.  I can use  Visual COBOL Eclipse to compile and run all the samples in the tutorials. Even some complicated SQL projects from SAMPLE Browser.

I know Eclipse is just a common GUI tools from IBM,  it calls cob (cob32 or cob64) to do the real job behind the scene.  How can I get the real cob command line from Eclipse (both compiler and linker parameters)?    That will really help me to understand how cob works.

Really appreciated.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: GET cob compiler and linker command line from Eclipse

Jump to solution

To see what being passed to 'cob', simply set the 'verbose' flag in the Project Properties page.  You will then see the various options that are passed when a build is done.

At the same time, you'll probably want to also enable the 'Generate Directives File' as that contains additional directives that we pass to cob (it will be created in the New_Configuration.bin output directory)

Compilation of a project is handled by a standard Apache Ant script.  This is generated from the project and is located a tthe top level of your project called .cobolBuild.  This file can be run under Ant if you so desire.

There are dedicated Ant tasks to handle the COBOL compilation so you won't be able to see exactly what is passed to cob though from here.

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: GET cob compiler and linker command line from Eclipse

Jump to solution

Even it could be better,  Micro Focus can add a feature as enhancement into Eclipse.   From Eclipse COBOL project, create a makefile.  Or maybe that feature already exists, I just do not know it.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: GET cob compiler and linker command line from Eclipse

Jump to solution

To see what being passed to 'cob', simply set the 'verbose' flag in the Project Properties page.  You will then see the various options that are passed when a build is done.

At the same time, you'll probably want to also enable the 'Generate Directives File' as that contains additional directives that we pass to cob (it will be created in the New_Configuration.bin output directory)

Compilation of a project is handled by a standard Apache Ant script.  This is generated from the project and is located a tthe top level of your project called .cobolBuild.  This file can be run under Ant if you so desire.

There are dedicated Ant tasks to handle the COBOL compilation so you won't be able to see exactly what is passed to cob though from here.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: GET cob compiler and linker command line from Eclipse

Jump to solution

Thank you, Darren

I turned on verbose flag. now I can see the compiling flags passed to cob command. 

I also checked the .cobolBuild XML file. it is not so useful to me so far.  I might expect in the next release version of VISUAL COBOL, I can see a makefile created  in the project.

Thank you again for the instruction.

-Jack

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.