OmixVisualization / qtjambi

QtJambi is a wrapper for using Qt in Java.
http://www.qtjambi.io
Other
365 stars 43 forks source link

[BUG]Qt6Core.dll: %1 is not a valid Win32 application. #174

Closed iammmmmmm closed 1 year ago

iammmmmmm commented 1 year ago

Describe the bug C:\qt\6.6.0\mingw_64\bin\Qt6Core.dll: %1 不是有效的 Win32 应用程序。 en: C:\qt\6.6.0\mingw_64\bin\Qt6Core.dll: %1 is not a valid Win32 application.

To Reproduce Steps to reproduce the behavior: 我在尝试运行例子时报错, 1.下载并安装了qt6sdk(通过在线安装,使用阿里云的镜像https://mirrors.aliyun.com/) 2.配置maven和idea的运行参数,向jvm参数添加了qt6的bin路径 3.点击运行 (在idea无法运行之后我尝试过重新安装qt6,从cmd手动运行,无一例外均同idea一般失败) en: I get an error when I try to run the example,

  1. Download and install the qt6SDK (through online installation, using Alibaba Cloud mirror https://mirrors.aliyun.com/)
  2. Configure the running parameters of Maven and Idea, and add the bin path of qt6 to the jvm parameters 3.Click Run (I tried reinstalling qt6 after the idea didn't run, running it manually from cmd, and without exception it all failed like idea)

Expected behavior 应该出现一个qt的提示框 “Hello World” en: A QT prompt should appear saying "Hello World" Screenshots

idea1 cmd1

System (please complete the following information): win 11 家庭版(home) x64 cpu AMD Ryzen 5 6600H with Radeon Graphics 3.30GHz jdk version: openjdk version "17" 2021-09-14 OpenJDK Runtime Environment (build 17+35-2724) OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing) Additional context

pom win info jdkversion md5

如果可以请帮我校验qt6core.dll的md5 在我电脑上的md5:#md5#Qt6Core.dll#1970.01.01@00.00:00 804232193FCBAF1F9E082CA49F0B56B5 Qt6Core.dll en: If you can, please help me verify qt6core.dll `s md5 my: #md5#Qt6Core.dll#1970.01.01@00.00:00 804232193FCBAF1F9E082CA49F0B56B5 Qt6Core.dll

omix commented 1 year ago

Don't use Qt for Mingw but use MSVC instead.

wolfseifert commented 1 year ago

If you really want to use Qt for Mingw you have to build QtJambi from sources using the Mingw compiler suite. I did this successfully some time ago (see #27). It seemed to work (without intensive testing), but later I switched back to MSVC for convenience (I did not want to build myself every new version). Also @omix will (probably) only support the MSVC version.

iammmmmmm commented 1 year ago

Thanks,but how to use msvc?

wolfseifert commented 1 year ago

Use MSVC like it is described in the README: substitute mingw_64 with msvc2019_64

iammmmmmm commented 1 year ago

Thank you very much, it worked properly

omix commented 1 year ago

@wolfseifert, thank you for helping!