1

I'm deploying my QT project to a windows machine and everything worked fine. Yesterday I add Qwt library to my project and when I deploy it the executable won't start giving this error (On QtCreator everything works fine)

The procedure entry point ?staticMetaObject@QGraphicsEffect@@2UQMetaObject@@B could not be located in the dynamic link library Qt5Widgets.dll

I think I included all the needed library.

I've tried to use windeployqt,

I've included

DEFINES += QWT_DLL

on the top of my .pro file as read here but it still give me that error. Maybe I miss some dependent dll. Do you have any idea on how to resolve this?

Community
  • 1
  • 1
nicodio
  • 55
  • 1
  • 6
  • Try to use `windeployqt.exe` if you use Windows – t3ft3l--i Jul 30 '15 at 09:42
  • I've already tried that and it gives me the same error. – nicodio Jul 30 '15 at 09:44
  • 1
    How about [`Dependency walker`](http://www.dependencywalker.com/)? – t3ft3l--i Jul 30 '15 at 09:46
  • Try to set path: `set PATH=%PATH%;${QWT_ROOT}\lib` or through Control Panel of Windows – t3ft3l--i Jul 30 '15 at 09:50
  • 1
    Hi, don't know if this is useful for you but I dealed with some similar stuff. My fault was that I used x64 DLL but a Win32 built on Visual Studio. After correcting this and putting the required DLLs in the same directory as the executable it worked for me. Or as mentioned above modify the PATH-variable. Good luck – marcus Jul 30 '15 at 10:12
  • have you clean and run qmake after the defines? – Megasa3 Jul 30 '15 at 10:30
  • Yes, I did the path thing and the qmake things. It was a problem of missing and wrong DLL, Dependency walker helped sort it out. Thanks! – nicodio Jul 30 '15 at 10:41

1 Answers1

0

I had the same issue. I couldn't understand it with dependency walker, as even working apps showed missing dlls.

I used qwt in my program and compiled it in Qt 5.5 with MSVC2013 32bit on a 64bit Windows 10. After changing 'Qt' folder name to 'QtHidden', as sugested here, I attempted to get the application to run with all the dlls in the same folder and was getting an weird error about qwt like you, althouth I had added qwt.dll.

To get it working I did the following:

  1. Copied all dlls in QtHidden/5.5/mingw492_32/bin to my deploying folder

  2. I copied all folders in QtHidden/5.5/mingw492_32/plugins

  3. Copied all folders in QtHidden/5.5/mingw492_32/qml

    // Pretty standard untill now

  4. added qwt.dll

    // Now for the trick

  5. Performed the steps 1,2,3 but for the folder QtHidden/5.5/msvc2013, overwriting all dlls and folders previously added from /mingw492_32.

So, what I believe is happening is that some dlls from mingw are needed, like libgcc_s_dw2-1.dll and libstdc++-6.dll, but all other dlls need to come from the MSVC2013 folder for qwt to work, wich was the compiler used.

I managed to run it in Windows Xp 32bit after adding MSVCP120.dll and MSVCR120.dll. Still needed this extra ones because MSVC2013 wasn't installed in the Windows Xp computer.

Compiled in Windows 10 with all resources and ran on Windows Xp. I'd call it a success.

Hope it helps someone else.

Community
  • 1
  • 1
A. Vieira
  • 1,213
  • 2
  • 11
  • 27