简体   繁体   中英

How to add a .a file in visual studio 2010 in c++

Good morning,

I'm currently using Qt 4.8.6 with visual studio 2010 c++ . I'm making a project which will allow me to control a lamp (using a DMX protocol), throught a qt application on my computer, to figure out my problem i found on google called Qdmx ( http://soft.pmad.net/qlight/qdmx/download.htm ). I downloaded the .DLL and the .a.

I added the .a file in the linker of visual studio, the path of the include and the DLL in the file where is placed my .sln .

When i try to compile one method which will allow the connection with the lamp, visual studio shows me 9 LNK 2019 errors :

(one for example : Error 8 error LNK2019: unresolved external symbol "public: __thiscall QDmxClient::QDmxClient(class QObject *)" (??0QDmxClient@@QAE@PAVQObject@@@Z) referenced in function "public: void __thiscall Lampe::ConnectionLampe(void)" (?ConnectionLampe@Lampe@@QAEXXZ) C:\\Users\\gdeca_000\\Desktop\\Debu_C++\\Dmx\\Lampe.obj Dmx )

I think it comes from the .a file which acts not like .lib.

How can i resolve those problems? Do i have to do a previous step before to add the .a files ?

Thanks for your time and help.

Regards.

The answer is: You don't.

Visual C++ static libraries and DLL export libraries all ends with .lib .

The files that end in .a are Unix libraries, for use in Unix or Unix-like environments (like macOS (formerly OSX), Linux, or on Windows the MinGW and Cygwin environments using the GCC or Clang compiler).

If there are no library files ending in .lib then there's no support for Visual C++.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM