-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building project with Qt #72
Comments
Because you have to remove the $PWD in the beginning of your openssl lib paths. Also, point to the main openssl folder (OpenSSL_mingw64), not the lib. I still cannot build this even after following directions. I tried the Qt 6.x branch, 5.15.15, 5.12.12, etc. Even if I tried to build from the 5.0 release commit, it still errors. |
I made a tutorial to set up Qt and build the projet : https://www.eliboa.com/NxNandManager_Set_up_and_build_project_with_Qt.pdf @OrGoN3 what errors ? |
followed the guide but when trying to make an actual executable that i could move to my flash drive it doesnt want to do it, https://puu.sh/IESRh/a2fc380301.png that is the latest attempt at building and the difference between release and debug, i can get it to run and show a gui if i just use the run command in QT creator but only in debug not release even though i have added the CONFIG+=ARCH64 CONFIG+=DYNAMIC to both just to test it |
Did you copy the dokan1.dll inside the release build folder (in my case build-NxNandManager-Desktop_Qt_5_13_0_MinGW64_Dynamic-Release) ? As you did for the debug folder when you followed the guide. Also, you'll need to deploy the project if you want to run the program outside Qt's environment (Qt Creator), a.k.a put all the required DLL's in the same folder as your executable :
|
Also, don't forget to ALWAYS run Qt Creator as an administrator because NxNandManager will try to elevate rights at startup. |
I think i am on the right track, but im still getting warnings appearing in QT Creator https://puu.sh/IEVNf/96281bef8b.png |
You don't need to care about warnings. Your build is fine, you should be able to run it anyway. |
Yeah it runs, im guessing the reason all the dlls are in the folder are linked to it being a dynamic build? either way i appreciate the help youve given. |
Yes, you would have to make a static build of Qt to get rid of all these dlls, but it's no piece of cake believe me! |
I'm getting the same warnings but then I'm always getting an error at the end. I will redo it soon and post back. Thank you for your support. I'm just trying to build the latest version to use. I'll report back and I'll use the setup from your guide. |
So I was able to successfully build based on your explicit directions. I copied dokan1.dll to the correct folder. I added "--gui", selected to run in terminal, and disabled qml debugging, as your picture shows. I built in debug. When I attempt to run, Application output is
If I don't run it in a terminal, I get an error popup
UPDATE: I noticed there was an environmental path for OpenSSL_mingw64/lib, but not OpenSSL_mingw64/bin. So I added one for the /bin and it worked. My question is, why did I have to do this extra step? I compiled a release version. I added it to the NxNandManager4.0 zip folder you shared with us here. I added dokan1.dll. It needed QT5Network.dll. I then took the dll's from the mingw version I was using and copied them into that folder. The program now runs. Thank you for all of your help. The question that remains is why did I have to manually add the OpenSSL_mingw64/bin/ folder to the running environment path in QT Creator to run the program? The new question is, can you share the procedure you used to statically link everything and to release a single exe as you have with version 5.0? Or is that too much to ask/unfeasible? Thanks again for all of your support, @eliboa !!!!! |
I'm glad it worked out for you both 👍 @OrGoN3 I'm guessing the reason you had to add ".../OpenSSL/bin" to your environment variable $PATH is because "libcrypto-1_1-x64.dll" was missing from NxNandManager.exe directory (or a bad version of the dll). This DLL is the only one needed from OpenSLL/bin folder. When an application linked to a DLL is launched, the system will try to locate the DLL file in the same folder as the executable. If not found, it'll scan every path listed in the system env. variable $PATH (can be overloaded by Qt Creator at run-time). Now if you want to use a static version of Qt, you need to compile it yourself first. Every "official" Qt kit is a collection of pre-built libraries to be linked dynamically. What you need to do is to recompile all QT source code from scratch. You can follow this guide : https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW. In NxNandManager project, the only lib that can't be built statically is Dokan, therefore dokan1.dll is mandatory. |
Thank you so much. As for libcrypto not being in the folder, correct it wasn't. But it was linked from the open ssl folders you provided. I assumed it would link to that by itself or build/copy from there. Basically, I'm wondering why I had to add to the build path and the other guy here didn't. Was I supposed to manually copy this or did my build mess up? Yes please do send me that. At Gmail is my address. I would like to attempt to build this statically. Thanks again! You are very helpful and patient! |
I updated the guide. Cf. the "Static build" part at the end. Let me know if something is missing or not working. |
I'm not sure if I should add my question here or create a new topic, but I'm trying to compile a static build and I'm getting a few errors:
I was able to build the dynamic version and followed the instructions for the static build but I'm obviously doing something wrong. I'm not sure why it's looking for \mingw810 when it should be using \mingw730 ? |
@sofakng you're not doing anything wrong, Qt Tools also have some libs to be built statically, I just forgot to add them in archive. |
i decided to give the static version a try for the latest update and this is what happens for me https://puu.sh/IV6bE/fdd9a3eae1.png EDIT: EDIT 2: So using the dll files from 4.0 release as a template, i decided to try copying the same dll files from C:\Qt\5.13.2\mingw73_64\bin (the version i used to compile) and it works now without any issues, i guess Qt is just like windows and is picky about file versions. |
@Simzy Did you manage to build a static version after all ? |
As you can see, i keep getting the error for building no matter which version ive tried using your files and was wondering if i have done something wrong somewhere
The text was updated successfully, but these errors were encountered: