0

my wxWidgets application has multiple C++ projects (one executable and all the other static libraries). I am using Visual Studio 2022 with a solution having Debug and Release configurations only for x64.

I decided to upgrade the wxWidgets version from 3.1.2 to 3.2.8. The Debug configuration builds without any error. The Release, unfortunately, presents a list of unresolved symbols (LINK2001) and redefinitions (LINK2005).

In all these cases, these errors appear during the linkage of the executable project, and are referencing objects existing only in one of those static libraries:

Error   LNK2001 unresolved external symbol "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXAEBVwxString@@H000@ZEA) wxPgConsole C:\pg\wxPgConsole\wxbase.lib(getTimeString.obj)

According to many posts, the solution for this kind of error is to define the WXUSINGDLL preprocessor symbol.

I have defined this in source code, but I got the same errors.

#define WXUSINGDLL

class wxPgConsole ... {
};

I have set it in the VCXPROJ also, but I got the same errors.

enter image description here

What else can I do to get a working Release build?

4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.