Problème d'installation du driver QMySql
-
As you can see from the screenshot I posted above, I don't have the subdirectory named CMakeFiles in "mysql" and therefore not the link.txt in qt but it is in the build-sqldrivers after typing the command.
I still tried to make the changes in the link.txt of build-sqldrivers with arm and this gives this build which seems normal to me since I did not make any changes in the QT folder :
-
Nice, now cmake does not complain about linking with Homebrew's MySQL client (link.txt is ok with "... -arch arm64...")
One final step: fixing the 3 .o files so that they are built for arm64 (and not x86_64):
Go to the same directory as when you edited the link.txt file:
/Users/melvin_vga/Qt/6.2.3/Src/qtbase/src/plugins/sqldrivers/mysql/CMakeFiles/QMYSQLDriverPlugin.dir
and look for a file called flags.make
It should have 11 lines (the first one says "DO NOT EDIT" we will do it anyway :-)
The last line in the file should begin with:CXX_FLAGS = -g -DNDEBUG -O2 -arch x86_64 -isysroot /Applications/Xcode.app/Conten...
change x86_64 to arm64:
CXX_FLAGS = -g -DNDEBUG -O2 -arch arm64 -isysroot /Applications/Xcode.app/Conten...
then try the
cmake --build .
again -
Is this message good ?
-
Yes looks good, you have the plugin built for arm64.
Now you need to copy it into your Qt 6.2.3 installation.
You have done that bedore, see the post above for using the find command in Terminal to see where the .dylib is, snd then copy it into yout Qt. -
I need to install no ?
cmake --install .
-
I don't have cmake install I just moved the build file into the qt file and it works perfectly! thank you very much!