January 31, 2012

KillGabio KillGabio
Lab Rat
45 posts

adding libs to my project and using them

 

hi guys!

here are the file that i have:

  • winfis.lib
  • winfis32.dll
  • winfis.h

the thing is that i dont know how to include them into my proyect so i can use the functions inside winfis.h

i read the documentation (i`m working on windows XP, Qt SKD 4.7.4 minGW) so i tried, but failing to exec in Qt environment qmake, mingw32-make..

i tried adding to my .pro file this (an example)

  1. INCLUDEPATH += "C:\\Documents and Settings\\home\\Escritorio\\L..."
  2.  
  3. LIBS += -L"C:\\Docume..."

with no luck. Hope someone can point me in the right direction. Thank you all in advance.

5 replies

January 31, 2012

Volker Volker
Ant Farmer
5428 posts

  1. # The directory which contains winfis.h
  2. INCLUDEPATH += "C:/Documents and Settings/user/path/include"
  3.  
  4. # The directory which contains winfis.lib
  5. LIBS += -L"C:/Documents and Settings/user/path/lib" -lwinfis

Both directories may be the same.

The DLL must be in a directory that is included in the regular search path. It should be sufficient to put it into the directory that contains your program’s .exe file.

BTW: Note the use of forward slashes, qmake automagically replaces them with backslashes if needed by the operating system.

February 1, 2012

KillGabio KillGabio
Lab Rat
45 posts

So i shouldn`t run the command mingw32-make (in Qt Environment) to the folders where i have this files?

February 1, 2012

Volker Volker
Ant Farmer
5428 posts

Ahm, no. Why should you? If you have a DLL and a .lib, I would expect that the library is built already, no?

February 1, 2012

KillGabio KillGabio
Lab Rat
45 posts

So right i was just checking :P i ll keep you posted when errors came up :D

February 2, 2012

Gerolf Gerolf
Robot Herder
3287 posts

KillGabio wrote:
here are the file that i have:
  • winfis.lib
  • winfis32.dll
  • winfis.h

    i read the documentation (i`m working on windows XP, Qt SKD 4.7.4 minGW) so i tried, but failing to exec in Qt environment qmake, mingw32-make..

I think the problem is, that you are using mingw
xxx.lib is a format that comes from MS compiler toolchain. I am not sure, if mingw can red them, if they are pure C (I don’t think so). If they are c++, they are definitly incompatible.

If they are C, you need to use late binding or need a mingw compatible link library.

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

 
  ‹‹ QUdpSocket on MacOs      Simple calculation using line edit ››

You must log in to post a reply. Not a member yet? Register here!