Skip to main content

How do i change the visual studio compiler directives for my project?

When i Click Project/MyProject properties and Click the COBOL tab i can see the compiler options under Build settings but they are not modifiable.

I want to change the compiler options to generate .int and/or .gnt files rather than/as well as .exe files

Thanks in advance for your help


#VisualStudio
#VisualCOBOL

How do i change the visual studio compiler directives for my project?

When i Click Project/MyProject properties and Click the COBOL tab i can see the compiler options under Build settings but they are not modifiable.

I want to change the compiler options to generate .int and/or .gnt files rather than/as well as .exe files

Thanks in advance for your help


#VisualStudio
#VisualCOBOL

To change the project type to generate int files open up the Application tab of the Project Properties and select INT/GNT as the output type. This will cause it to generate .int files. If you wish to generate gnt files instead then additionally open the COBOL tab and then click on the Compile to gnt option.

There is an INT/GNT project template that you can select when you are creating the project that will set this up automatically for you.

BTW, you can enter directives into the Additional Directives field on the COBOL tab but you cannot enter them into the Build Settings field as these are read-only.

If you press the F1 key while on the COBOL tab a Help screen will be displayed that explains some of these options in detail.


To change the project type to generate int files open up the Application tab of the Project Properties and select INT/GNT as the output type. This will cause it to generate .int files. If you wish to generate gnt files instead then additionally open the COBOL tab and then click on the Compile to gnt option.

There is an INT/GNT project template that you can select when you are creating the project that will set this up automatically for you.

BTW, you can enter directives into the Additional Directives field on the COBOL tab but you cannot enter them into the Build Settings field as these are read-only.

If you press the F1 key while on the COBOL tab a Help screen will be displayed that explains some of these options in detail.

Thank you very much for your reply.

When i go to create a project i have the following options (Edited to show ALL options). Could you advise me which options i should set?

https://ibb.co/VtRH4Tk

When i go into the project properties it doesn't offer me the INT/GNT option

https://ibb.co/jhvFQC5

When i look at the documentation it doesn't say that INT/GNT is an option.

https://ibb.co/QF3nkfR


Thank you very much for your reply.

When i go to create a project i have the following options (Edited to show ALL options). Could you advise me which options i should set?

https://ibb.co/VtRH4Tk

When i go into the project properties it doesn't offer me the INT/GNT option

https://ibb.co/jhvFQC5

When i look at the documentation it doesn't say that INT/GNT is an option.

https://ibb.co/QF3nkfR

Change the dropdown on the right from "Desktop" to "All project types" and the INT/GNT project type will appear.

The project type that you selected and currently have open is a .NET managed COBOL project and this is why the INT/GNT options do not appear. You need to either select the INT/GNT project template or select the native console application in order to support INT/GNT.


Change the dropdown on the right from "Desktop" to "All project types" and the INT/GNT project type will appear.

The project type that you selected and currently have open is a .NET managed COBOL project and this is why the INT/GNT options do not appear. You need to either select the INT/GNT project template or select the native console application in order to support INT/GNT.

Fantastic. Thank you very much