I also read the response to the question you posted on the wxwidgets forum. The answer is an incorrect guess about your project properties. For example, the wxBryan sample does build for UNICODE. The preprocessor definitions are set as follows -
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Despite much help, I cannot get a simple wxWidgets "Hello World" project to build. As I view the problem, it compiles then fails the linking process. But I lack the skills to understand the error message and determine what is wrong. There are 474 unresolved external. I have parsed out the first message in the hopes of understanding the error.
Will you, someone, please look at this and identify the actual error. What is the first item that cannot be resolved?
1>hello_world_10.obj : error LNK2019: unresolved external symbol
"__declspec declalration specification ?
(
dllimport import a dll?
)
void __cdecl wxOnAssert the dll to import? find in a dll somewhere?
(
char const *,
int,
char const *,
char const *,
char const *
)"
(
__imp_?wxOnAssert@@YAXPBDH000@Z
)
referenced in function
"public: __thiscall wxEventFunctorMethod
<
class wxEventTypeTag
<
class wxCommandEvent
>,
class MyFrame,
class wxCommandEvent,
class MyFrame
>
::
wxEventFunctorMethod
<
class wxEventTypeTag
<
class wxCommandEvent
>,
class MyFrame,
class wxCommandEvent,
class MyFrame
>
(
void
(
__thiscall MyFrame::*
)
(class wxCommandEvent &
),
class MyFrame *
)"
(
??0?$wxEventFunctorMethod@V?$wxEventTypeTag@VwxCommandEvent@@@@VMyFrame@@VwxCommandEvent@@V2@@@QAE@P8MyFrame@@AEXAAVwxCommandEvent@@@ZPAV1@@Z
)
I also read the response to the question you posted on the wxwidgets forum. The answer is an incorrect guess about your project properties. For example, the wxBryan sample does build for UNICODE. The preprocessor definitions are set as follows -
For your hello_world_10 or wxBryan projects open the property page Configuration Properties->Linker->General and check the setting for Additional Library Directories. It should look like this -
Click the down arrow to the right and then select "Edit". Another dialog should open that looks like this -
Click the "Macros>>" button to expand the dialog. After it expands, you should be able to find the wxwidgets library search path as shown here -
And here is another diagnostic procedure that you can perform. For your hello_world_10 or wxBryan projects open the property page Configuration Properties->C++->Preprocessor and select the option to preprocess to a file as shown here -
Build the project. The build should fail but a file with a .i extension should be created in the Debug folder under your project's folder as shown here -
Open the .i file in a text editor and search for #pragma comment
You should find lines in the file that look like this for the wxwidgets lib files -
This is how the linker is instructed to find the wxwidgets import libraries.
RLWA32-6355 Posted recently: And here is another diagnostic procedure that you can perform. …
I made that change. It looks exactly as pictured. But, things are worse in that I cannot build the sample code provided and named minimal. It is left in its original directory here:
C:\WXWIDGETS\3.2.0\samples\minimal
To the output, I am unsure of the proper location. Looking here:
C:\WXWIDGETS\3.2.0\samples\minimal\vc_mswud\minimal\minimal.tlog
CL.command.1.tlog and unsuccessfulbuild are empty with no text.
Minimal.lastbuildstate contains:
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0:
Debug|Win32|C:\WXWIDGETS\3.2.0\samples\minimal\|
Am I looking in the wrong place?
There is also this error:
>C:\WXWIDGETS\3.2.0\samples\minimal\minimal.cpp(20,10): fatal error C1083: Cannot open include file: 'wx/wxprec.h': No such file or directory
I think this demonstrates the core problem, but from my evaluations, it should be found.
I found a verbose option to set and these lines remain in the Output Panel
1>VSLANG = 1033
1>VSSKUEDITION = Professional
1>windir = C:\WINDOWS
1>WXWIN = C:\WXWIDGETS\3.1.7
1>ZES_ENABLE_SYSMAN = 1
WXWIN is set to C:\WXWIDGETS\3.2.0
The previous version has since been deleted and the computer restarted many times since.
I still see that as a problem.
I had several problems that seem to have culminated in this thread.
https://learn.microsoft.com/en-us/answers/questions/941709/environment-variable-is-wrong-in-vs.html?childToView=948280#answer-948280
Marking this is resolved.