Yes, there does not seem to be a .lib file in the distribution. The only way I 
know of to use the DLL in this case is to use LoadLibrary() calls to access 
each function. (Although I could be wrong). Here's how to do this:
 
 
HINSTANCE hInst = LoadLibrary("mitab.dll");
if (hInst==0)
{
    AfxMessageBox("Could not load mitab.dll!");
}
else
{
FARPROC fp_mitab_c_getlibversion = GetProcAddress(hInst,"[EMAIL PROTECTED]");
int (*mitab_c_getlibversion)(/*args*/) = (int 
(*)(/*args*/))fp_mitab_c_getlibversion;
int nVersion = mitab_c_getlibversion();
CString s;
s.Format("Mitab version = %d",nVersion);
AfxMessageBox(s);
}Personally I use a version of Mitab that I built myself from the source files 
- this is another option for you.
 
Cheers,
Anthony.

 
 


--- On Tue, 25/11/08, skahrkling <[EMAIL PROTECTED]> wrote:

From: skahrkling <[EMAIL PROTECTED]>
Subject: [mitab] Re: how to get mitab_c_create() etc. to link to .dll
To: [email protected]
Received: Tuesday, 25 November, 2008, 2:49 PM






Thank you for your help so far.

I added Project -> Properties -> Configuration Properties -> Linker -
> Input -> Additional Dependencies -> mitab.dll

Now I get even more cryptic:
mitab.dll : fatal error LNK1107: invalid or corrupt file: cannot 
read at 0x280

Looking for info on that error I see:
"LNK1107 could also occur if you attempt to pass a module (.dll 
or .netmodule extension created with /clr:noAssembly or /NOASSEMBLY) 
to the linker; pass the .obj file instead.

I'd be happy to pass .obj instead, if I had one. But that may not be 
the cause.

Also you mentioned that I should add a path to the LIB file. There 
is no lib file in the mitab-1.7.0- win32 package. There is a mention 
of compiling the library in the README.TXT. Is that what I need? I 
don't find any makefiles - although that section seems to be catered 
more to VB (nmake -f makefile.vc)

Sorry I need more hand-holding.

 














      Start your day with Yahoo!7 and win a Sony Bravia TV. Enter now 
http://au.docs.yahoo.com/homepageset/?p1=other&p2=au&p3=tagline

Reply via email to