Problem with linking - can't find the right solution.



Hi to everybody. I al tired of correcting the following error, probably
you can help me.
I am write a 16-bit application for Windows 3.1 using Borland C++ 5.02.
I am developing an application for ISA DLL driver for some equipment
and I have this DLL. I obtained the LIB static library from it using
IMPLIB, but as soon as I try to use functions from it I get the
message: 'Unresolved external ...'. I have tried all means: I put the
LIB into the LIB path and directory of compiler, used make file and so
on, but the compiler does not see the library derived from DLL. I cant
make it work!
I write the following code (simplified):

#include <windows.h>
#include "inc\8112.h"

void main (void)
{
W_8112_Initial(1,0x220);
return;
}

My header file (8112.h) is the following (truncated):
#ifdef __cplusplus
extern "C" {
#endif
....
int FAR PASCAL W_8112_Initial( int card_number , int base_address );
....
#ifdef __cplusplus

}
#endif
#ifdef __cplusplus

Do you have any ideas? How to force the compiler use the library? Or
may be modify the library? I have NO ideas, because I have tried
everything.

.



Relevant Pages

  • Re: #pragma lib buggers everything up
    ... > derive the client application's classes from the classes in the lib, ... to link the final executable (be it an EXE or a DLL) and it turns out ... there's no problem discarding unused functions at this ... and derived class is very fragile - it depends on a particular compiler, ...
    (microsoft.public.vc.language)
  • Problem with Borland C++ 5.02
    ... I am developing an application for ISA DLL driver for some equipment ... LIB into the LIB path and directory of compiler, ...
    (comp.lang.c)
  • Re: Problem with a DLL and a Static Library
    ... In the header file of the LIB, ... I've inlcuded the sameheader file in the DLL ...
    (microsoft.public.vc.language)
  • Re: mex linker fails
    ... does this mean that the .lib is actually using the .dll? ... Try using "dependency walker" to look at the DLL. ... Matlab supported compiler for windows, so it's not straightforward to set up mex ... bash-3.1$ # Create import libraries ...
    (comp.soft-sys.matlab)
  • Re: Export C++ class from a Borland DLL and use it in Microsoft VC
    ... I have a DLL with its export library wrote in Borland C++ 6. ... This means that C++ code is incompatible between different compilers, ...
    (microsoft.public.dotnet.languages.vc)