Open java71 opened 8 months ago
I believe there is no such option. Still, a solution exists. Note that any console output performed by the image will be lost.
Hi Peter,Yes thanks.I already use this item. After deep searching and comparing files (before after), only two bytes are changed:- 1 for defining executable type- 1 for a checksum...I think that integration of such an option by GRAAL team should not be the more complex.So as I suspect that you are in communication with ORACLE GRAAL engineers, maybe one day, you will have the opportunity to report this issue.Thanks again for your reply.envoyé : 23 janvier 2024 à 08:39de : Peter Zhelezniakov @.>à : bell-sw/Liberica @.>cc : java71 @.>, Author @.>objet : Re: [bell-sw/Liberica] Executable generated for WINDOWS without useless DOC console window (Issue bell-sw/LibericaNIK#2) I believe there is no such option. Still, a solution exists. Note that any console output performed by the image will be lost.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I've figured out slightly more straightforward way to achieve the same
Thanks Peter, it seemed to be a great idea but it does not work for the moment...Failed generating 'program' after 3m 7s.The build process encountered an unexpected error:> java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 2Linker command executed:'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\cl.exe' '/Fec:_data\program.exe' program.obj 'C:_tools\liberica-21\lib\static\windows-amd64\net.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\prism_d3d.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\extnet.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\nio.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\javafx_font.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\sunmscapi.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\javafx_iio.lib' 'C:_tools\liberica-21\lib\svm\clibraries\windows-amd64\libchelper.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\java.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\prefs.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\glass.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\zip.lib' 'C:_tools\liberica-21\lib\svm\clibraries\windows-amd64\jvm.lib' /MD 'C:_tools\liberica-21\lib\static\windows-amd64\net.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\prism_d3d.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\extnet.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\nio.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\javafx_font.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\sunmscapi.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\javafx_iio.lib' 'C:_tools\liberica-21\lib\svm\clibraries\windows-amd64\libchelper.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\java.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\prefs.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\glass.lib' 'C:_tools\liberica-21\lib\static\windows-amd64\zip.lib' 'C:_tools\liberica-21\lib\svm\clibraries\windows-amd64\jvm.lib' /link /INCREMENTAL:NO /NODEFAULTLIB:LIBCMT /FILEALIGN:4096 '/IMPLIB:C:\Users\Florence\AppData\Local\Temp\SVM-17476286249141906364\program.lib' '/LIBPATH:C:_tools\liberica-21\lib\static\windows-amd64' '/LIBPATH:C:_tools\liberica-21\lib\svm\clibraries\windows-amd64' comdlg32.lib dwmapi.lib imm32.lib uiautomationcore.lib urlmon.lib winmm.lib gdi32.lib ncrypt.lib crypt32.lib version.lib advapi32.lib ws2_32.lib secur32.lib iphlpapi.lib userenv.lib mswsock.lib shell32.lib /SUBSYSTEM:WINDOWSLinker command output:Compilateur d'optimisation Microsoft (R) C/C++ version?19.32.31328 pour x64Copyright (C) Microsoft Corporation. Tous droits r?serv?s.Microsoft (R) Incremental Linker Version 14.32.31328.0Copyright (C) Microsoft Corporation. All rights reserved./out:c:_data\program.exe/INCREMENTAL:NO/NODEFAULTLIB:LIBCMT/FILEALIGN:4096/IMPLIB:C:\Users\Florence\AppData\Local\Temp\SVM-17476286249141906364\program.lib/LIBPATH:C:_tools\liberica-21\lib\static\windows-amd64/LIBPATH:C:_tools\liberica-21\lib\svm\clibraries\windows-amd64comdlg32.libdwmapi.libimm32.libuiautomationcore.liburlmon.libwinmm.libgdi32.libncrypt.libcrypt32.libversion.libadvapi32.libws2_32.libsecur32.libiphlpapi.libuserenv.libmswsock.libshell32.lib/SUBSYSTEM:WINDOWSprogram.objC:_tools\liberica-21\lib\static\windows-amd64\net.libC:_tools\liberica-21\lib\static\windows-amd64\prism_d3d.libC:_tools\liberica-21\lib\static\windows-amd64\extnet.libC:_tools\liberica-21\lib\static\windows-amd64\nio.libC:_tools\liberica-21\lib\static\windows-amd64\javafx_font.libC:_tools\liberica-21\lib\static\windows-amd64\sunmscapi.libC:_tools\liberica-21\lib\static\windows-amd64\javafx_iio.libC:_tools\liberica-21\lib\svm\clibraries\windows-amd64\libchelper.libC:_tools\liberica-21\lib\static\windows-amd64\java.libC:_tools\liberica-21\lib\static\windows-amd64\prefs.libC:_tools\liberica-21\lib\static\windows-amd64\glass.libC:_tools\liberica-21\lib\static\windows-amd64\zip.libC:_tools\liberica-21\lib\svm\clibraries\windows-amd64\jvm.libC:_tools\liberica-21\lib\static\windows-amd64\net.libC:_tools\liberica-21\lib\static\windows-amd64\prism_d3d.libC:_tools\liberica-21\lib\static\windows-amd64\extnet.libC:_tools\liberica-21\lib\static\windows-amd64\nio.libC:_tools\liberica-21\lib\static\windows-amd64\javafx_font.libC:_tools\liberica-21\lib\static\windows-amd64\sunmscapi.libC:_tools\liberica-21\lib\static\windows-amd64\javafx_iio.libC:_tools\liberica-21\lib\svm\clibraries\windows-amd64\libchelper.libC:_tools\liberica-21\lib\static\windows-amd64\java.libC:_tools\liberica-21\lib\static\windows-amd64\prefs.libC:_tools\liberica-21\lib\static\windows-amd64\glass.libC:_tools\liberica-21\lib\static\windows-amd64\zip.libC:_tools\liberica-21\lib\svm\clibraries\windows-amd64\jvm.lib Cr?ation de la biblioth?que C:\Users\Florence\AppData\Local\Temp\SVM-17476286249141906364\program.lib et de l'objet C:\Users\Florence\AppData\Local\Temp\SVM-17476286249141906364\program.expMSVCRT.lib(exe_winmain.obj) : error LNK2019: symbole externe non r?solu WinMain r?f?renc? dans la fonction "int cdecl scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)c:_data\program.exe : fatal error LNK1120: 1 externes non r?solusPlease inspect the generated error report at:c:_data\svm_err_b_20240124T135902.889_pid17732.mdIf you are unable to resolve this problem, please file an issue with the error report at:https://bell-sw.com/supportenvoyé : 24 janvier 2024 à 13:00de : Peter Zhelezniakov @.>à : bell-sw/Liberica @.>cc : java71 @.>, Author @.>objet : Re: [bell-sw/Liberica] Executable generated for WINDOWS without useless DOC console window (Issue bell-sw/LibericaNIK#2) I've figured out slightly more straightforward way to achieve the same—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I don't see the /ENTRY
parameter in the output -- did you forget it?
Slightly hackish but works.
<arg>-H:NativeLinkerOption=/SUBSYSTEM:WINDOWS</arg>
<arg>-H:NativeLinkerOption=/ENTRY:mainCRTStartup</arg>
Is there any option added by LIBERICA team permitting to generate WINDOWS executable that do not start any DOS-like console window ? I understand that ORACLE does not care this as they do not care any longer AWT problems. So there is no option flag from 'official' graalvm native image. But maybe from liberica ?
Many thank for your precious work.