Re: linking libraries



Peter Flass writes:

I have a compiler that produces executable files that won't run unless
you also have a couple of DLL files in your LIBPATH. Interestingly,
the compiler came with not only those DLL files, but a couple of LIB
files with identical root filenames to the two DLL files.

Is this a static library or an import library? The latter only
identifies entry points in the DLL.

After taking a quick look at the contents of the libraries using a
hex file viewer, I don't see much of what I would expect code to look
like, but there are lots of redundant occurrences of a string like
"basemodel", which leads me to believe that it might just be an import
library, in which case the compiler probably already linked those
two libraries when it built the application.

I've looked
through the documentation to see if there might be some way to link
those LIB files to the executable, thus eliminating the need to have
the DLL files in the LIBPATH, but I haven't found anything. Might
thre be a way to do it using the OS/2 system linker? I can imagine
that it might require using a command line option on the compiler to
produce only an object file and not an executable, and then letting
the linker link that object file to the two libraries.

That sounds about right to me. Just include the libraries on the
command line when you link.

I suppose it wouldn't hurt to try, but if they are import libraries,
then it won't accomplish what I was hoping to do.

.



Relevant Pages

  • linking libraries
    ... I have a compiler that produces executable files that won't run unless ... the compiler came with not only those DLL files, ... the DLL files in the LIBPATH, ... the linker link that object file to the two libraries. ...
    (comp.os.os2.programmer.misc)
  • Re: What is .NET Framework 2.0.50727?
    ... The .Net framework is a collection of DLL files that are the 'runtime' ... chosen to create using these libraries. ... So it is just a huge runtime set of files. ...
    (microsoft.public.windowsxp.basics)
  • Re: Relationship.....
    ... the dll files which are linked with compilers.iam using visual studio ... Those are what you feed the linker with. ... libraries can be either static or dynamic. ... - Dynamic libraries are a pair of a .lib and .dll files. ...
    (microsoft.public.vc.language)
  • Re: Relationship.....
    ... the dll files which are linked with compilers.iam using visual studio ... Those are what you feed the linker with. ... libraries can be either static or dynamic. ...
    (microsoft.public.vc.language)
  • Re: linking libraries
    ... the compiler came with not only those DLL files, ... the DLL files in the LIBPATH, ... Just include the libraries on the command line when you link. ...
    (comp.os.os2.programmer.misc)