How to use 3.1.3 wxMSW binaries

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.
Post Reply
[email protected]&vdw
In need of some credit
In need of some credit
Posts: 1
Joined: Thu May 21, 2020 8:22 pm

How to use 3.1.3 wxMSW binaries

Post by [email protected]&vdw » 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.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4043
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to use 3.1.3 wxMSW binaries

Post by ONEEYEMAN » Fri May 22, 2020 1:45 am

Hi,
You could try to post on that blog about this solution...

Thank you.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2355
Joined: Sun Jan 03, 2010 5:45 pm

Re: How to use 3.1.3 wxMSW binaries

Post by PB » Fri May 22, 2020 6:07 am

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...

Post Reply