Hi All,

I have migrated from QT 4.7 to QT 5.1. I have a code for compiling a .dll file for a plugin in my software. The .pro file is here.

Qt Code:
  1. DccSrc = ../../
  2. include($$DccSrc"DccGlobals.pri")
  3.  
  4. TEMPLATE = lib
  5. CommonPath = $$DccSrc"Common"
  6. DEPENDPATH += . Interface $$CommonPath
  7. DLLDESTDIR = $$DCC_BIN/plugins
  8.  
  9. DEFINES += MTF_LIBRARY
  10. DEFINES += QT __LCC__
  11.  
  12. SOURCES += MTF.cpp \
  13. LibTI_MTF.c \
  14. LibTI_MTF_mcc_component_data.c
  15.  
  16. HEADERS += MTF.h \
  17. LibTI_MTF.h \
  18. ../../../Common/ctypes.h
  19.  
  20. INCLUDEPATH += . $$CommonPath ../../MatLabHFilesForQT "C:\Program Files\MATLAB\MATLAB Compiler Runtime\v713\extern\include"
  21.  
  22.  
  23. LIBS += -L"C:/Program Files/MATLAB/MATLAB Compiler Runtime/v713/extern/lib/win32/microsoft" -lmclmcrrt
To copy to clipboard, switch view to plain text mode 

It gets compiled in QT 4.7.3. But in QT 5 it is not able to find the symbols for MCR library functions.
D:\QT\DCC_TuningTool\plugins\MTF\MTF.cpp:50: error: undefined reference to `mxCreateDoubleScalar_proxy(double)'
D:\QT\DCC_TuningTool\plugins\MTF\MTF.cpp:51: error: undefined reference to `mxCreateDoubleScalar_proxy(double)'
D:\QT\DCC_TuningTool\plugins\MTF\MTF.cpp:52: error: undefined reference to `mxCreateDoubleScalar_proxy(double)'
D:\QT\DCC_TuningTool\plugins\MTF\MTF.cpp:55: error: undefined reference to `mxCreateString_proxy(char const*)'

and so on..

all these symbols exist on mclmcrrt.lib

If I do a static linking
Qt Code:
  1. DEFINE += static
To copy to clipboard, switch view to plain text mode 
it gets compiled. But I need dynamic linking for this plug in.

I have other plug-ins, where I don't have the any CPP source file, there static/dynamic both linking works.