Highlighted
Absent Member.
Absent Member.
2423 views

Compilation Issue

Hi,

I have recently installed visual cobol 2.2 (visual studio 2012) on my machine. while i am trying to compile any COBOL code in the IDE i am facing issue compilation failure with below description:

Directives file _cobol.dir not found
*1507-U
Illegal command line
COBOL compile: 0 item succeeded or up-to-date, 1 failed.
Done building project "ConsoleApplication2.cblproj" -- FAILED.
I am facing same error while compiling with CMD.
Can anyone please help me with this as i am stuck and unable to identify the cause.
Thanks
Anand

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compilation Issue

Hello,

The answer is right in the error message, which says "Directives file _cobol.dir not found"

It looks like you are compiling with either the directive USE or DIR, which instructs the compiler to read a specific directive file. In your case, you have either USE(_cobol.dir) or DIR(_cobol.dir), and the compiler cannot find _cobol.dir in the current folder.

To resolve the problem, you simply need to make sure you have _cobol.dir in your current folder.

Regards,

–Ғɑɳօ
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compilation Issue

Actually the file _cobol.dir is generated by the Visual Studio IDE when the build process is done so it makes no sense that you would get this same error when trying to compile from the command line unless you are running under msbuild.

The message about illegal command line is normally displayed if the product is not licensed properly.

If you open up the Micro Focus License Manager from the start menu and look at installed licenses what is displayed?

I would also suggest that you test the product by opening up one of the sample solutions in the Samples Browser and seeing if it compiles successfully. If it does then this tells us that the problem lies within your project file.

Thanks.

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.