Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
First of all try build and run minimal sample from samples folder to check have your built the library right. if sample works - just copy settings from there.
cannot open source file "../../../lib/vc141_dll/mswd/wx/setup.h"
Notice the difference.
In general it's easier to take the minimal sample and its project files and copy it instead of creating a new VS solution from scratch. There are many thing you can do wrong when doing it manually.
Seeing "mswd" instead of "mswud" in the library path indicates that you also did not set Character Set to "Use Unicode Character Set" in the project settings.
And as always, I disagree with doublemax about copying the minimal sample project which uses relative paths to wxWidgets instead of the officially recommended WXWIN nor does not use the recommended setup for MSVC.
Setting up wxWidgets project is easy, as long as you understand how C++ works and can read the official docs, see e.g. here viewtopic.php?f=19&t=46700#p196105
PB,
Copying the minimal (or any other sample) was the recommended way to start a project for a long time.
Currently with an additiopn of .props file the process becomes very easy.
ONEEYEMAN wrote: ↑Fri Mar 13, 2020 4:34 pm
Copying the minimal (or any other sample) was the recommended way to start a project for a long time.
Currently with an additiopn of .props file the process becomes very easy.
This time no code error is shown. But Linker Tools Error.
Error LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) WxWidgets_Application_3 C:\Users\varun\Desktop\workspace\visual_studio_projects_2017\WxWidgets_Application_3\WxWidgets_Application_3\MSVCRTD.lib(exe_main.obj)
cannot open source file "../../../lib/vc141_dll/mswd/wx/setup.h"
Notice the difference.
In general it's easier to take the minimal sample and its project files and copy it instead of creating a new VS solution from scratch. There are many thing you can do wrong when doing it manually.
Yes. I corrected those. And tried with simple program. But Linker issues.
Seeing "mswd" instead of "mswud" in the library path indicates that you also did not set Character Set to "Use Unicode Character Set" in the project settings.
And as always, I disagree with doublemax about copying the minimal sample project which uses relative paths to wxWidgets instead of the officially recommended WXWIN nor does not use the recommended setup for MSVC.
Setting up wxWidgets project is easy, as long as you understand how C++ works and can read the official docs, see e.g. here viewtopic.php?f=19&t=46700#p196105
Solved.
In Project Configurations -> Linker -> System -> SubSystem -> Windows (/SUBSYSTEM:WINDOWS).
Previously it was set as Console (/SUBSYSTEM:CONSOLE)
The link to SO https://stackoverflow.com/a/60693124/11566024