QT MSVC Protobuf C++ - Run time error
-
Hi everyone,
Im using windows QT 5.15 MSVC 2019 64 bit configuration.
I have installed protobuf using vcpkg.
Also I can able to link the library as followsLIBS += -LC:\vcpkg\installed\x64-windows\lib -llibprotobuf
I can able to build the code succesfully. But while running Im getting the pop up stating cannot find dll as below.
My. pro file
QT -= guiCONFIG += c++11 console
CONFIG -= app_bundleLIBS += -LC:\vcpkg\installed\x64-windows\lib -llibprotobuf
INCLUDEPATH += C:\vcpkg\installed\x64-windows\include
HEADERS +=
m.pb.hSOURCES +=
main.cpp
m.pb.ccqnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target -
@VimHar said in QT MSVC Protobuf C++ - Run time error:
In that case how can we link each library specifically for debug and release. Kindly add!
See qmake scopes
@Christian-Ehrlicher Thank You!
-
Hey I got the solution,
the reason is the software couldnt able to find the location of dll specified in path.
Even I have added the direct bin path into PATH environment variable.Then I added the respective dll path from "debug" folder. It worked.
Think the QT has two modes debug and release, each mode needs specific dll in that case,
Correct me if im wrong?
In that case how can we link each library specifically for debug and release. Kindly add! -
Hey I got the solution,
the reason is the software couldnt able to find the location of dll specified in path.
Even I have added the direct bin path into PATH environment variable.Then I added the respective dll path from "debug" folder. It worked.
Think the QT has two modes debug and release, each mode needs specific dll in that case,
Correct me if im wrong?
In that case how can we link each library specifically for debug and release. Kindly add!@VimHar said in QT MSVC Protobuf C++ - Run time error:
In that case how can we link each library specifically for debug and release. Kindly add!
See qmake scopes
-
@VimHar said in QT MSVC Protobuf C++ - Run time error:
In that case how can we link each library specifically for debug and release. Kindly add!
See qmake scopes
@Christian-Ehrlicher Thank You!