Connect the .dll library to the project. Then made include .hpp library to main.cpp. I copied an example of using the library and got such errors. enter image description here

Here is the code:

#include <QCoreApplication> #include<com_pub.hpp> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); // include application headers #define NUM_OF_RETRIES 1 GRC_TYPE RetCode; BOOLE bOpenAndRunning = FALSE; COM_BAUD_RATE cur=COM_BAUD_19200; // initialize GeoCOM RetCode = COM_Init(); if (RetCode == GRC_OK) { // open a connection to the FlexLine instrument RetCode = COM_OpenConnection (COM_1, cur, NUM_OF_RETRIES); if (RetCode == GRC_OK) { bOpenAndRunning = TRUE; } } return a.exec(); } 

Here is the .pro file:

 QT += core QT -= gui CONFIG += c++11 TARGET = untitled4 CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp HEADERS+=com_pub.hpp win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../build-untitled4-Desktop_Qt_5_7_0_MinGW_32bit-Debug/ -lGeoComS2K else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../build-untitled4-Desktop_Qt_5_7_0_MinGW_32bit-Debug/ -lGeoComS2K else:unix: LIBS += -L$$PWD/../build-untitled4-Desktop_Qt_5_7_0_MinGW_32bit-Debug/ -lGeoComS2K INCLUDEPATH += $$PWD/../build-untitled4-Desktop_Qt_5_7_0_MinGW_32bit-Debug DEPENDPATH += $$PWD/../build-untitled4-Desktop_Qt_5_7_0_MinGW_32bit-Debug 
  • Linker error: it cannot find the implementation of the specified functions. Static connected to? - Vladimir Martyanov
  • @ Vladimir Martyanov, no, the library consists of .hpp .lib and .dll. In the .pro file I chose to add a library and added a .lib file. then it’s possible that .lib is done by the msvs compiler and needs to be redone to .a. downloaded the converter, repeated the operations above - the same error - jesuscrew77
  • Try to collect from sorts. I do not believe in the converter. - Vladimir Martyanov
  • @ Vladimir Martyanov, I don’t have sorts, are there any other solutions? - jesuscrew77
  • one
    Check the capacity of the library, operating system and your assembly. - maestro

0