Page 1 of 1

How to use 3.1.3 wxMSW binaries

Posted: Thu May 21, 2020 8:51 pm
This isn't a post about a problem, but instead a solution. The page at https://www.wxwidgets.org/blog/2012/08/ ... -binaries/ can be updated for instructions on using the wxWidgets 3.1.3 version of the precompiled DDLs with Windows, especially if you are using CLion as your IDE and MSVC ver 15 as your compiler. After receiving assistance from the users of Stack Overflow, I have worked up a solution.

First: Do not use the headers currently available for download at https://github.com/wxWidgets/wxWidgets/ ... headers.7z. Instead, extract the include/ folder/directory from https://github.com/wxWidgets/wxWidgets/ ... s-3.1.3.7z.

Second: Make sure your cmakelists.txt file has these lines:

Code: Select all

add_definitions(-DWXUSINGDLL=1)
add_definitions(-DwxMSVC_VERSION_AUTO=1)
add_definitions(-DwxMSVC_VERSION_ABI_COMPAT=1)
add_definitions(-DUNICODE=1)
add_definitions(-D_UNICODE=1)

include_directories(
    includes
    full path to /wxWidgets
    full path to /wxWidgets/include
    full path to /wxWidgets/include/msvc
    full path to /wxWidgets/lib/vc14x_x64_dll
    full path to /wxWidgets/lib/vc14x_x64_dll/mswud
)
link_directories(
    full path to /wxWidgets/lib/vc14x_x64_dll
)

set_target_properties(${PROJECT_NAME} PROPERTIES
    LINK_FLAGS /SUBSYSTEM:WINDOWS
    )

Third: After you have successfully compiled your first application, run it outside of CLion. You will be confronted with system errors looking for certain DDLs that need to be copied to the folder/directory containing your executable. In my case, those files are wxmsw313ud_core_vc14x_x64.dll and wxbase313ud_vc14x_x64.dll.

Hope this keeps you out of trouble.

For more information, please see https://stackoverflow.com/questions/618 ... with-clion.

Re: How to use 3.1.3 wxMSW binaries

Posted: Fri May 22, 2020 1:45 am
by ONEEYEMAN
Hi,
You could try to post on that blog about this solution...

Thank you.

Re: How to use 3.1.3 wxMSW binaries

Posted: Fri May 22, 2020 6:07 am
by PB
I have no experience with CLion but just curious did you really need to add these includes, these should not be normally needed?
[email protected]&vdw wrote:
Thu May 21, 2020 8:51 pm

Code: Select all

include_directories(
    full path to /wxWidgets
    full path to /wxWidgets/lib/vc14x_x64_dll
)
And what was the problem with the official headers archive? If there is an issue and the headers are invalid, you should report it...