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.