Hello to everyone,
I'm trying to compile a simple wxWidgets project with MSVC. I don't use
Visual Studio (GUI), I compile with CL in console. I actually use Scons
but that's off topic.
I am not getting any compilation errors. The project is compiling. But
the executable file does not open. So I can't see the GUI.
There are no errors.
When I compile the same project with MinGW there is no problem. Same
code and same project.
I got the build parameters from the samples in the samples folder. I
modified them for my own project.
Here are the cl and linker commands:
```cmd
cl /FoShutdownTimer.obj /c ShutdownTimer.cpp /MT /DWIN32 /O2
/D_CRT_SECURE_NO_DEPRECATE=1 /D_CRT_NON_CONFORMING_SWPRINTFS=1
/D_SCL_SECURE_NO_WARNINGS=1 /D__NO_VC_CRTDBG__ /D__WXMSW__ /DNDEBUG
/D_UNICODE /Ilib\vc_x64_lib\mswu /Iinclude /I. /W4 /D_WINDOWS /DNOPCH
/GR /EHsc /nologo ShutdownTimer.cpp
ShutdownTimer.cpp(142): warning C4100: 'event': unreferenced formal
parameter
rc /d WIN32 /d _CRT_SECURE_NO_DEPRECATE=1 /d
_CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 /d
__NO_VC_CRTDBG__ /d __WXMSW__ /d NDEBUG /d _UNICODE /i
lib\vc_x64_lib\mswu /i include /i . /d _WINDOWS /d NOPCH /fost.res st.rc
link /OUT:ShutdownTimer.exe ShutdownTimer.obj /NOLOGO /opt:ref /opt:icf
/MACHINE:X64 /MANIFEST:EMBED
/MANIFESTINPUT:include/wx/msw/amd64_dpi_aware_pmv2.manifest /LIBPATH:lib
wxmsw31u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib
wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib
winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib
oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib
wininet.lib oleacc.libuxtheme.lib
```
Folder layout:
* include
* lib - MONOLITHIC=1 shared=0 BUILD=release
* Shutdowntimer.cpp - main application
* st.rc - resource file taken from the minimal example.
I am sharing code and res file with paste.ubuntu.
English is not my native language. I may have chosen the wrong words. If
you want more details I will share them.
ShutdownTimer.cpp:
https://paste.ubuntu.com/p/D2xDqcbb4W/
resource file:
https://paste.ubuntu.com/p/8qhnQQmdT2/
Some details:
* Visual studio 2019
* windows 10 64-bit
* wx version: 3.0.5
* libraries and compiler set for 64bit
Thanks