IMPLIB and LNK1136



Hi,
I am using Micro Focus Visual Object COBOL V1.0, on Windows 98SE.

I have the following code;

$set SourceFormat"Free" case
special-names.
call-convention 74 is WINAPI.
procedure division.
CALL "COB32API".
DISPLAY "Downloading File".
CALL WINAPI "URLDownloadToFile" USING
BY VALUE 0
BY REFERENCE "http://www.microsoft.com/index.html";
BY REFERENCE "index.htm"
BY VALUE 0
BY VALUE 0
END-CALL.
DISPLAY "Download Complete".
stop run.

URLDownloadToFile is contained in URLMON.DLL, which is in the
\WINDOWS\SYSTEM directory.

There is no URLMON.LIB file included with VOC, so I have to create one
using IMPLIB.EXE. I note that IMPLIB.EXE does not come with VOC. So, I
am using IMPLIB.EXE that comes with Borland C++ 5.5.

I use the command line;

implib urlmon.lib c:\windows\system\urlmon.dll

to create URLMON.LIB, and it is created, with no errors.

When I link it into my COBOL program, I get the following error;

C:\VisOC\LIB\URLMON.LIB: fatal error LNK1136: invalid or corrupt file

Here are the options for IMPLIB.EXE

Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise
Corporation

Syntax: IMPLIB [options] libname[.lib] [@respfile | srcname] [srcname
....]
Options:
-a Add '_' alias for MS flavor cdecl functions
-c Case sensitive symbols
-f Force imports by name (with hints)
-w No Warnings

I have tried the -a option, same result.
I have tried the -c option, same result.
I have tried the -f option, same result.
I have tried no options, same result.

The URLMON.LIB file is being created in the C:\VisOC\LIB directory.

I welcome any constructive suggestions on how to create the .LIB file
correctly so that I can link it into my COBOL program.

Thanks,

Joe

.



Relevant Pages