Hi,
For context I studied Computer Science in the late 90's, however am by no means a developer. I can read and understand the code but having never been in the industry (I work in data and mechanical assets) the use of build environments and tools is very new to me.
I have spent a couple of days installing various versions of Qt, MSYS, MinGW, OpenSSL and have had very little success in achieving a final compiled version of FastECU.
I am interested in the project and feel I may have something to add if I am able to successfully compile a working exe.
Would it be possible to have some guidance on what and how I need to install the various tools to do this?
For example, in the Issues section regarding Build in Github there is the line " Just make sure Qt contains QtSerial, QtCharts and QtXml modules and that MinGW is 32-bit version so that OpenPort drivers works" but the Qt Maintenance Tool doesn't allow for these modules to be included in Qt5.15, and the only kits that can be included are for 64 bit MinGW.
Thanks!
Ben
Building from source
Moderator: Global Moderator
Re: Building from source
Hi,
I assume you are using Windows. Please note that you need 32-bit versions of Qt, GCC and OpenSSL because most of J2534 drivers are 32-bit for now.
Please try the following.
I assume you are using Windows. Please note that you need 32-bit versions of Qt, GCC and OpenSSL because most of J2534 drivers are 32-bit for now.
Please try the following.
- Get the "toolchain" here. You'll need both Qt prebuilt framework and GCC binaries.
- Unpack prebuilt framework to a folder you had installed Qt, say QT_INSTALL_DIR.
- Unpack GCC binaries to QT_INSTALL_DIR\tools.
- Install OpenSSL x32. I assume you'll use default path "C:\Program Files (x86)\OpenSSL-Win32".
- Launch Qt Creator, select menu "Edit\Preferences" and on each tab manually add debugger (optional), compiler (mandatory), Qt version (mandatory) and finally a kit (mandatory).
- Open the project, set the kit for it, and modify under Buil Environment the PATH variable by adding path to OpenSSL binaries to it, i.e. "C:\Program Files (x86)\OpenSSL-Win32\bin". You can always change these settings by selecting Project button on the left pan of Qt Creator
Re: Building from source
Excellent, thank you - it took me a few iterations but eventually got there. Below is a log of actions I specifically took to achieve a compiled "FastECU.exe" both for my future reference, and if anyone else faces a similar struggle to myself.
What I have done
Install Qt from qt-online-installer-windows-x64-4.8.1.exe - unable to locate an x86 specific installer.
Generic Desktop installation to Qt 6.8 selected
Qt install directory is C:/Qt
Download alesv files "qt_5.15.16_x32_static.7z" and "winlibs-i686-posix-dwarf-gcc-8.5.0-mingw-w64-9.0.0-r1.7z"
Extracted
Contents "5.15.16_x32" of "qt_5.15.16_x32_static.7z" copied to C:\Qt\5.15.16_x32 (dir)
Contents "mingw32" of "winlibs-i686-posix-dwarf-gcc-8.5.0-mingw-w64-9.0.0-r1.7z" copied to C:\Qt\tools\mingw32 (dir)
Downloaded OpenSSL x32 file "Win32OpenSSL-3_4_1.exe" from https://slproweb.com/products/Win32OpenSSL.html
Ran installer
Changed to C:\OpenSSL-Win32 as install directory
Question asked
Next,Install
Opened Qt Creator > Edit, Preferences. First open option is 'Kits'
'Kits' has tabs 'Kits', 'Qt Versions', 'Compilers', 'Debuggers'
Debugger - not set
Compiler - Add MinGW and set to i686-w64-mingw32-gcc with path C:\Qt\Tools\mingw32\bin\i686-w64-mingw32-gcc.exe - This auto set the C++ compiler path (g++)
Qt Versions - set to Qt %{Qt:Version} (5.15.16_x32) with path C:\Qt\5.15.16_x32\bin\qmake.exe (Path is set not the Name)
Has warning No QML utility installed generating a ! warning icon
Kits - Set Compiler to MinGW, Qt Version to 5.15.16
Apply, OK
Configure project with the Kit as above
Update Environment Path variable with "C:\OpenSSL-Win32\bin;"
FastECU.pro - changed line 31 to reflect my OpenSSL-Win32 install location.
Run
Error
Run
Compile complete, Fast ECU starts errors due to no ecu def/logger def (as expected though)
I will need to fix up my path in FastECU.pro but other than that I now have a complied exe.
Thank you so much, I think my understanding now is that a codebase is written for a specific compiler and qmake version, and generally will need to adhere to that environment in order to successfully compile?
I do have 356 marked "issues". mostly unused variables etc, is this due to me using a slightly incorrect version of something? Or is it just how it is?
What I have done
Install Qt from qt-online-installer-windows-x64-4.8.1.exe - unable to locate an x86 specific installer.
Generic Desktop installation to Qt 6.8 selected
Qt install directory is C:/Qt
Download alesv files "qt_5.15.16_x32_static.7z" and "winlibs-i686-posix-dwarf-gcc-8.5.0-mingw-w64-9.0.0-r1.7z"
Extracted
Contents "5.15.16_x32" of "qt_5.15.16_x32_static.7z" copied to C:\Qt\5.15.16_x32 (dir)
Contents "mingw32" of "winlibs-i686-posix-dwarf-gcc-8.5.0-mingw-w64-9.0.0-r1.7z" copied to C:\Qt\tools\mingw32 (dir)
Downloaded OpenSSL x32 file "Win32OpenSSL-3_4_1.exe" from https://slproweb.com/products/Win32OpenSSL.html
Ran installer
Changed to C:\OpenSSL-Win32 as install directory
Question asked
#seemed to make more sense here..."Copy OpenSSL DLLs to:
"The OpenSSL binaries (/bin) directory"
Next,Install
Opened Qt Creator > Edit, Preferences. First open option is 'Kits'
'Kits' has tabs 'Kits', 'Qt Versions', 'Compilers', 'Debuggers'
Debugger - not set
Compiler - Add MinGW and set to i686-w64-mingw32-gcc with path C:\Qt\Tools\mingw32\bin\i686-w64-mingw32-gcc.exe - This auto set the C++ compiler path (g++)
Qt Versions - set to Qt %{Qt:Version} (5.15.16_x32) with path C:\Qt\5.15.16_x32\bin\qmake.exe (Path is set not the Name)
Has warning No QML utility installed generating a ! warning icon
Kits - Set Compiler to MinGW, Qt Version to 5.15.16
Apply, OK
Configure project with the Kit as above
Update Environment Path variable with "C:\OpenSSL-Win32\bin;"
FastECU.pro - changed line 31 to reflect my OpenSSL-Win32 install location.
Run
Error
Copied OpenSSL-Win32 dir to C:\Program Files (x86)\C:\Qt\5.15.16_x32\lib\libqtmain.a -L"C:\Program Files (x86)\OpenSSL-Win32\bin" -lshell32
c:/qt/tools/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.5.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lcrypto-3
Run
Compile complete, Fast ECU starts errors due to no ecu def/logger def (as expected though)
I will need to fix up my path in FastECU.pro but other than that I now have a complied exe.
Thank you so much, I think my understanding now is that a codebase is written for a specific compiler and qmake version, and generally will need to adhere to that environment in order to successfully compile?
I do have 356 marked "issues". mostly unused variables etc, is this due to me using a slightly incorrect version of something? Or is it just how it is?
Re: Building from source
It is just how it isBen78 wrote: Sun Feb 23, 2025 6:10 am I do have 356 marked "issues". mostly unused variables etc, is this due to me using a slightly incorrect version of something? Or is it just how it is?
Re: Building from source
Ah cool, I'll do that.
Can I ask, in the Beta.5 exe posted at Romraider the other day, all of the qDebug() content was posted to the syslogs. I can't find any log level switches, or anything else that will push qDebug messages into write_syslog. Is that in a version not posted to github?
Can I ask, in the Beta.5 exe posted at Romraider the other day, all of the qDebug() content was posted to the syslogs. I can't find any log level switches, or anything else that will push qDebug messages into write_syslog. Is that in a version not posted to github?
Re: Building from source
Hi, have you found 32-bit versions of QT? I tried building from source, but when I use Tatrix, I get the message:Ben78 wrote: Sun Feb 23, 2025 11:12 am Ah cool, I'll do that.
Can I ask, in the Beta.5 exe posted at Romraider the other day, all of the qDebug() content was posted to the syslogs. I can't find any log level switches, or anything else that will push qDebug messages into write_syslog. Is that in a version not posted to github?
I've concluded that the problem is that my QT is 64-bit."[2025-10-29 23:10:32.309] (DD) Testing for op20pt32.dll"
"[2025-10-29 23:10:32.310] (DD) op20pt32.dll not found"
"[2025-10-29 23:10:32.310] (DD) Tested installed drivers: 1"
"[2025-10-29 23:10:32.310] (DD) Testing for C:\\Windows\\SysWOW64\\op20pt32.dll"
"[2025-10-29 23:10:32.310] (DD) C:\\Windows\\SysWOW64\\op20pt32.dll not found"
"[2025-10-29 23:10:32.310] (DD) Tested installed drivers: 1"
"[2025-10-29 23:10:32.310] (DD) Initializing interface failed!"
"[2025-10-29 23:10:32.310] (DD) Testing j2534 interface, please wait..."
"[2025-10-29 23:10:32.310] (EE) INIT: Can't load J2534 DLL."
"[2025-10-29 23:10:32.310] (DD) J2534: Failed to open interface!"
Re: Building from source
Thank you! Sorry, I can't read English fluently. That's why I skipped it.