Win 32 lib
-
Hello guys! I am building an app to comunicate with a position encoder through a device. Commands can be sent to this device in c++, using their library and headers. From their manual, I understand that their library is written as a 32 bit one (correct me if i’m wrong). If i write the code i visual express it works pretty fine, but when i try to import the .dll and .lib to qt, i first get this error: collect2-ld-returned-5-exit-status. When i apply the solution i found on a lot of sites, i get another error: Unable to start program, path or permission wrong?
I cannot find any solution to this one, and i am preeety sure the path to the debug executable is correct. Also, when i try to run the executable on it’s own, i get a windows error saying that windows cant run this program.Ps: it has size 0
-
Hi and welcome to devnet,
Are you using a 32bit build of Qt ?
How did you "import" the library ? -
using 64 bit qt build
win32 {
LIBS += "C:/Users/Tony/Documents/untitled/lib_name.dll"
LIBS += "C:/Users/Tony/Documents/untitled/lib_name.lib"
}
And i get -> collect2.exe: error: ld returned 5 exit statusWhen i also add
mingw {
contains(QT_ARCH, x86_64): {
LIBS+=-Wl,--no-gc-sections
}
}
I get -> Failed to start program. Path or permissions wrong?
As i mentioned, the executable is built, but is 0kb in size