On 7/29/2023 12:17 AM, Johann ''Myrkraverk'' Oskarsson via Iup-users wrote:
Dear IUP Users,

How does one build an IUP application such that it doesn't pop up a
console, with CL from VS 2022?

The way I currently build a working application is with

   cl /Ic:/opt/iup/x64_dll16\include hello.c c:\opt\IUP\x64_dll16\iup.lib

where I installed the iup‑3.30_Win64_dll16_lib.zip file in the aptly
named directory c:\opt\iup\x64_dll16.  There is no manifest, resource,
or other file that suggests how to use it, included in this binary
distribution [that I noticed.]

If I add

   /link /subsystem:windows

to the above command line, I get the error

  LIBCMT.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)

so I suspect some additional steps are needed to build for Windows,
using the command line, but I cannot guess what.  Is this solvable
without changing the source code and use WinMain() instead of main()?

In particular, the iupstub.lib file, mentioned at

  https://iup.sourceforge.net/en/drv/win32.html

is not to be found in the above mentioned .zip file.  Is it missing from
this build, or has it been superseded by something else?


Thanks,
Johann


_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to