I am building LIB and exe projects using Qt5.15.2 and VS2019.
exe project use LIB file as input dependencies.
LIB project compiles well and successfully make .lib file.
but in exe file, it says some Qt signals in lib are undefined.
so I try to include mocs_compilation_Release.cpp in lib project, but result was same.
Is there way to solve qt signal undefined error in VS-qt addin project?
Thank you.
It looks visual studio find function name as same as qt signal.
Related
I'm new to Qt. I'm under Win 10, 64bit, using Visual Studio 2019.
I installed Qt 5.15.1 a while ago to work on an open source project. Python and CMake are also installed. vcvarsall.bat was also executed.
Now I'm working on a new project where I need QtCharts. I found that QtCharts was not installed by default. So I installed QtCharts with the Qt MaintenanceTool.exe. After that, I was expecting to see the *.lib files added to the lib folder but what I see are added *.prl files.
What is the next step for me to get the *.lib files.
Well, I found the .lib files I was expecting are there in the lib folder. I'm not sure how and when they got there. I re-checked in the lib folder after I succesfully built Qt provided examples that use QtCharts within Qt Creator. The dates on the files are from back to September 2020, though. Like if the files had been copied from another folder or from an archive.
Anyway. My problem is solved.
I was trying to create a exe file of my Qt project.
I found this post: How to create executable file for a Qt Application?
and realised that i dont have a mingwm10.dll file in that directory.
Are there any other ways of creating a exe file or any other location where mingwm10.dll might be located?
I am using qt 5.6.
mingwm10.dll is a runtime file for the MinGW.org toolchain. Qt moved towards a MinGW-w64-based toolchain (which is essentially an expanded and newer implementation of the Win32 headers and import libraries), which doesn't have this runtime dependency. Ignore it, you don't need it. You might need the libgcc and libstdc++ DLLs though, but that's the same with any (non-statically built) toolchain.
Note you can use the windeployqt utility to automatically copy over all runtime depencies of an executable. You can enable it by adding windeployqt to CONFIG if you're using qmake, or you could just run it yourself:
windeployqt my_app.exe
This command will copy all DLLs (including the Qt platform plugins etc.) so that the application can be run by e.g. double-clicking, instead of only in the specific environment of an IDE.
I wrote a little Qt utility in VS2013. It works fine when running from IDE - even debugging is great. But VS doesn't generate usable exe (error 0xc000007b - "The application was unable start to work correctly", after I've installed all required qt's dll's).
Is there any way to compile everything and correctly from VS? To make really runnable exe?
Or - How can I write correct pro file for qmake?
I tried to write some. qmake generated from it makefile without any erros, but running VS's nmake it gives a "fatal error: U1077 return code '0x2'".
As I think it is problem with linker - even I wrote for all used modules all required QT += lines.
Can anybody help? I think I'm not alone who met this problem.
Thanks.
When you get an error like you got it means you have some dlls missing. You can only find out what dlls are missing using DependencyWalker.
*.pro files can be generated from Visual Studion using the Visual Studio Add-in for Qt4 or with Visual Studio Add-in for Qt5 depending on your Qt version.
If you have a Qt/VS application you want to deploy, AFAIK the following dlls are needed:
Qt5Core.dll
Qt5Gui.dll
Qt5Widgets.dll
platforms (folder)
qminimal.dll
qoffscreen.dll
qwindows.dll
icuin52.dll
icudt52.dll
icuuc52.dll
YourApplication.exe
For more information see http://qt-project.org/doc/qt-4.8/deployment-windows.html
I'm using QtCreator and I got two projects, each with an own PRO file.
The Viewer is a normal Qt app.
The other one, let's call it Utilities, is supposed to be a static library which is used in the Viewer.
However when I compile and run the Viewer (everything compiles fine), I get an error message telling me Utilities.dll was not found.
This is the first part of the PRO-file for Utilities:
QT -= core gui
TARGET = Utilities
TEMPLATE = lib
CONFIG += staticlib warn_on $$(QMAKESPEC)
Shouldn't it work that way?
Why is it compiling the Utilities.a file fine but asking me for the DLL at runtime? It's supposed to be a static library :(
Since I did not specify some needed libraries in Utilities.pro, it apparently did not link as you'd expect for a static library.
My platform is W7-x64, latest Qt SDK and MingW 4.4 bundled with it.
Hope anyone can help :/
Thanks!
The CONFIG += staticlib request your target library to be a static lib not the entire dependency chain ... I am pretty sure your .a lib will require mingw dlls to run ...
If you want to reduce dependencies try the MSVC tool chain (Qt provide pre-compiled package for that) you will end with one or two mandatory dll dependencies. Or you can link again static mingw SDK (you will probably have to build it your-self ...).
To get Facebook integration in our Nokia Symbian application we intend to use this library:
http://gitorious.org/qfacebookconnect
It is not otherwise working completely correctly, but it's a good start.
I have my project (.pro and .cpp files, using Qt Creator), which works fine in the emulator. I included this libqfacebook in the project in this way (in the .pro file):
LIBS += -LC:\projects\Pristop\Nokia\facebook_lib\libqfacebook-build-simulator\debug -lqfacebookconnect
INCLUDEPATH += C:\projects\Pristop\Nokia\facebook_lib\qfacebookconnect\inc
It works fine in the emulator. I use Qt Creator for everything, also to build libqfacebook. But if I want to test the application on a real phone, so to prepare a .sis file, I get this error:
:: error: No rule to make target `\NokiaQtSDK\Symbian\SDK\epoc32\release\armv5\LIB\qfacebookconnect.dso', needed by `\NokiaQtSDK\Symbian\SDK\epoc32\release\gcce\udeb\DogajaItak.exe'. Stop.
So I need to get a .dso file based on the source code of the qfacebookconnect library. For the emulator .lib and .pdb were enough. Obviously the difference is that .dso is arm while .lib & .pdb are x86.
If I try to configure qfacebookconnect to build for the phone, I get this error:
Makefile:232: error: PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement. Stop.
It is correct that I do not want a .sis, all I want is a .dso.
If I go to Projects->Build Settings for Symbian Device for qfacebookconnect and I remove the build step "create SIS package" for qfacebookconnect, there is no error anymore, but I still don't believe it built a .dso for me.
So the question is how to configure Qt Creator or the .pro file to build me a .dso, or how to include external libraries in my .sis in another way?
I needed to freeze the library..
I found all the information there:
https://code.google.com/p/qfacebookconnect/issues/detail?id=13