2

I'm planning to use id3lib in my application. I'm looking for a way to use the library as a DLL. I've noticed that they released the library in various form: one of which is windows binary. My target platform in Windows, and I'll use Qt 4.8. After I extract the files in windows binary, I found the following files in Release folder:

  • id3lib.dll
  • id3lib.exp
  • id3lib.lib

I know how to use a DLL in Qt given the DLL, one or more header files where function prototypes resides, and with or without the *.lib file. This package doesn't come with a header file.

How am I supposed to use this package without any header file? What's the purpose of the *.lib and *.exp files here? As far as I know *.lib files are used for static linking with functions which I don't want in my program.

Elemental
  • 7,365
  • 2
  • 28
  • 33
Donotalo
  • 12,748
  • 25
  • 83
  • 121

2 Answers2

2

You've just missed the header. It is available under the include subfolder (see here), also the .lib file is still needed for linking, even if you'll be using the DLL.

Robert
  • 2,330
  • 29
  • 47
  • I've the complete source code of id3lib. the windows binary section doesn't come with any header file. how do i know which header file should i use? – Donotalo Mar 19 '12 at 07:08
  • @Donotalo: follow the link in Robert's answer. It takes you straight to id3.h. – Harry Johnston Mar 19 '12 at 18:22
  • @HarryJohnston: id3.h is not the file to include. it is tag.h described here: http://id3lib.sourceforge.net/api/index.html. however, i tried both of them but still couldn't resolve some unreferenced link. – Donotalo Mar 20 '12 at 04:31
  • @Donotalo: are you getting an error from the compiler or from the linker? What functions/symbols are undefined? – Harry Johnston Mar 20 '12 at 20:26
  • @HarryJohnston: that's another question: http://stackoverflow.com/questions/9786022/undefined-reference-linker-error-while-using-id3lib-library-in-a-c-application – Donotalo Mar 21 '12 at 04:42
1

The usual course is to use a header file #included in the C++ file, the .lib file to link to and the .dll is required at run time.

The header file should/may be in another package as the same header is probably used for different kinds of linking strategies.

At worst you should be able to use a tool such as depends.exe to view the exported symbols and create your own h file to match - but it would be better to find a .h file issued with the release.

Elemental
  • 7,365
  • 2
  • 28
  • 33