0

I have a library C/C++ which I need to use. I got *.dll's and *.lib files delivered. The problem is, that the *.lib file is not working with GCC or Visual C++ compiler (there is an error saying that file is invaild). I managed to run it only with very old Borland C++ Complier (BCC 5.5).

I know that this *.lib file has been created using borland's implib tool directly from DLL. However it's not working with Visual C++ compiler - I tried to build it myself using this tool with option -a so like:

implib -a file.lib file.dll

but it's not working either.

So here's my question - can I somehow modify that *.lib file to use with other compiler? Or can I build a new one using *.dll I have?

EDIT: I tried to build my own *.lib file using lib tool from Visual Studio. It doesn't work, when I'm trying to use a function from this library there's an error saying

"main.obj||error LNK2019: unresolved external symbol _<function_name>@<number> referenced in function _main|"

What can I do? I'm almost sure that im generating my *.lib correctly, I opened it with notepad and I can find there names of functions as well as name of my *.dll.

I also tried to create a *.a file using dlltool from MinGW, but it creates an empty file.

I have no idea what else can I do.

Rames
  • 918
  • 11
  • 27
  • See http://stackoverflow.com/questions/9360280/how-to-make-a-lib-file-when-have-a-dll-file-and-a-header-file – sashoalm May 23 '14 at 16:03
  • @sashoalm It's not working in my case, however the error has changed now it's saying "undefined reference to `melGetData@28'" – Rames May 23 '14 at 18:37

0 Answers0