Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION
J McBride
Visitor.
245 views

How do I find the actual Link error

When Converting a application that generates a .DLL  I am getting a very vauge error:

[cobollink] Micro Focus COBOL - CBLLINK utility
[cobollink] Version 4.0.0.65 Copyright (C) Micro Focus 1984-2018. All rights reserved.
[cobollink]
[cobollink] Link complete with errors
[cobollink]

cobol.cfg.Generic_Debug_Build:

nature.specific.build.cfg.Generic_Debug_Build:

post.build.cfg.Generic_Debug_Build:

cobolbuild.cfg.Generic_Debug_Build:


BUILD FAILED
Build finished with 1 errors, 0 warnings, 0 notices and a maximum exit code of 0

Maximum exit code exceeded: 0

Total time: 4 seconds
-------------------------------BUILD FINISHED------------------------------

 

Is there any way to get an expanded detail on the issue with the link? 

0 Likes
5 Replies
Micro Focus Expert
Micro Focus Expert

Re: How do I find the actual Link error

From your screen shots it appears that you are using the Eclipse IDE. Right-click on the project and select Properties and then open up Micro Focus-->Build Configuration-->Link and turn on the Display verbose output option for the link.

Does this provide you with additional information?

0 Likes
J McBride
Visitor.

Re: How do I find the actual Link error

I have already done that before, it gives an additional line but it does not show an error.  If I remove the include reference it compiles and links, but it is incorrect as the components for the com object are not there.  Is there a limit to the number of programs that can be linked in Visual Cobol?

 

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: How do I find the actual Link error

There shouldn't really be a limit on number of .obj modules being linked but there is a limit on the size that an executable can be.

You might have to try running the cbllink command from the command line in order to see the message being displayed. Does the extra line that is generated when using verbose output show you the complete command that is being executed?

By "include reference" do you mean that you are using additional resource or .def files in the link? Where are you specifying these options?

 

0 Likes
J McBride
Visitor.

Re: How do I find the actual Link error

In Netexpress we link the DLL with the following :

-D cbldc001.obj xfhtrace.obj @include.txt

the include.txt is a list of all the .obj files with fully qualified pathing that are necessary for the com object to be built.  In NetExpress we have two ouputs from this project A .DLL file and a .TLB, From what I have been able to get out of the help files is that the .TLB is no longer supported under Visual Cobol (if it is still a viable contruct is somewhat ambiguous).

I have attempted to build this project as it is converted, and for another unsupported issue have removed the cbldc001.obj xfhtrace.obj from the link. The result is I get past the first link errors but I get a file not found on the include file.  I corrected the link with the fully qualified path to the Include file.  And the cyrptic link error starts comming out.  I have removed the addition link options and have added the set of .obj's to the additional link files and I still get the Error.  The only additional line received when I set the verbose flag on is:

[cobollink] C:\MICROF~1\VISUAL~2\bin\cbllink.exe -d -Re -Oplkxmlrouter.dll C:\API\VisualWRN\eclipse\plkxmlrouter\DEBUG\plkxmlrouter.res XMLFeed-to-Process.obj @objects2844280786928248230.rsp

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: How do I find the actual Link error

Net Express has specific support for handling/registering COM/typelibs which are not included in Visual COBOL. It uses the MIDL and resource compiler that were delivered as part of the Windows SDK which was included in Net Express.

Visual COBOL does not have that support built-in. When using Visual COBOL you will have to install the Windows SDK and use the MIDL compiler in order to compile the .IDL files. This will have to be completed as an external task from a command prompt, or as as Pre-Build task within Visual Studio or Eclipse. The .RC can be added to your Visual COBOL for Visual Studio project - just ensure you you change the .RC properties to Resource Compile, but for Eclipse you will have to compile the .RC as a separate step as well as it doesn't appear to recognize .RC as a build type.

 

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.