Highlighted
Absent Member.
Absent Member.
876 views

compile not creating .o or .gnt file

 Hi,

I'm new to the community so I hope I'm asking the question correctly.  I installed Visual Studio 2017 for personal use and microfocus COBOL.  When I load the program in, the build button is displayed.  The compile button is displayed under it.  The compile completes with no errors - very simple program.  I do not have a run button and debug doesn't have a button to step through the program.  When I check the folder where the program is, I have a .int file but no .o or .gnt file.  What do I need to do to be able to run this very simple program?

Thanks,

Chuck Dial

Tags (2)
0 Likes
6 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: compile not creating .o or .gnt file

The best way to use Visual COBOL is to create a new project and add your source files to the project. Then all functionality is available at your fingertips.

If you really wish to just open up a standalone program source file and compile and debug it you can.

This is called Standalone Editing. You can set directives for standalone editing that will cause it to generate an object file other than an .int but again it is highly recommended that you use a project as this is how Visual Studio was designed.

Setting the build directives is covered here:

To debug click the mouse inside the open source file and then the Debug menu should also show the Debug F5 or Step Into F5 options.

I would recommend that you run thru the product tutorials covering the IDE use prior to just jumping in and trying it with your code.

Thanks.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: compile not creating .o or .gnt file

to run this program, you will need to open the 32/64 bit micro focus command window. you can get to this window by going to the desktop start button, go to micro focus programs and open the associated programs. There is a 32 bit and a 64 bit command option. Select the appropriate option, probably 32 bit. It will open the appropriate command window. In this window, go the directory where the .int program is stored. You can now type ' run programname.int' where programname is the name of your program. the program should now run.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: compile not creating .o or .gnt file

Thanks for the reply. I created a project and attached my program. If I do a build, the build button goes away and the debug button won't let me step through the code. The f5 does not do anything either. If I close MS Visual Studio and reopen it, the build button is there and the debug button inside debug is clickable but the start without debug button is not. I can now step through the code. I do have a lot to learn about projects. I also had the .idy file associated with Adobe. I fixed that. Thanks again.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: compile not creating .o or .gnt file

You might want to look at some of the getting started videos on YouTube.

The one for Projects and Solutions can be found here:

There are also videos covering the editor and the debugger.

What type of project did you create?
Can you show me a screenshot of the project in Visual Studio?

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: compile not creating .o or .gnt file

First one is before doing compile, second is after compile.  It is a managed console app.

 

 

Please s ee snapshot - before doing compile.  Second one is after compile.  It is a managed console application.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: compile not creating .o or .gnt file

You have not added the program to a project or the program and the project would show under the solution name in the Solution Explorer window. It looks like you are using source control for your programs.

If you go to File-->New-->Project in the IDE menu and create your project there it should then create a project file with the extension .cblproj and a solution file with the extension .sln. If you then add programs to the projects by right-clicking the project name and selecting Add-->Existing Item and then navigating to and selecting your program it will be added to the project. You should then be able to edit, compile, debug it without a problem.

If you close Visual Studio and reopen it then you need to use File-->Open Project/Solution and then navigate to where the .sln file is and open that in order for it to reopen the solution and project.
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.