Can anyone suggest a tutorial or getting started guide to CLion and wxWdgets? I have searched around but am unable to find anything.
Getting started with wxWidgets and CLion?
What seems to be the problem? Also, it would be nice to know you OS version as well as wx version. Thank you. –
Dolabriform
Hello, I have never worked with CLion or wxWidgets. The OS is Windows 10, wxWidgets v3.1.0. The only C++ development that I have done in the past is with Qt so, there was very little configuration of the IDE to get started. It appears that it would be much easier to use Visual Studio for wxWidgets however, I am a big fan of Jetbrains (IntelliJ, PyCharm, etc.) so, I wanted to give CLion a whirl. Thanks! –
Cynthea
is CLion some kind of Java IDE? I never heard about it before... Nevertheless if it can work with C++ it is very easy. Just build wxWIdgets either using MinGW or MSVC and set it up in CLion. No special requirements necessary –
Dolabriform
I just googled it and it is C/C++ IDE which uses CMake. There is a GitHub fork of wxWidgets that is using CMake. Post on either wx-users or on the forums.wxwidgets.org and you will get a link to its repo. Then build the library and set up the IDE –
Dolabriform
I presume you already have CMake set up so you should be good after you get a CMake files for wxWidgets. After you build the library, just open the project, point the include directory to wxWidgets/include and lib directory to wxWidgets/lib and that's it. After that just build the code, and fix any compiler errors you get. ;-) –
Dolabriform
It this CMake file. It may help you. #39871553 –
Gelding
Try this solution. I think it can help you #39871553 –
Gelding
Well,
- you should download WxWidgets here http://www.wxwidgets.org/downloads/.
- Then, you should compile and install to your system.
- Download and install CLion.
- Create new Project.
- Then, follow to this edit your CMakeLists.txt Building wxWidgets 3.1.0 on CLion (Ubuntu)
- Then try Hello World sample http://docs.wxwidgets.org/trunk/overview_helloworld.html.
- If everything okay, start to develop great apps!
I built the latest version of wxWidget from scratch on macOS and didn't want to install wxWidget anywhere, but wanted to use the binaries for my CLion projects. Here's what my CMakeLists.txt file looks like below. Editing, building, running and debugging all works great with this file.
cmake_minimum_required(VERSION 3.26)
project(stc) # stc could be any project name you want
set(CMAKE_CXX_STANDARD 11)
add_compile_definitions(__WXOSX_COCOA__)
add_compile_definitions(_FILE_OFFSET_BITS=64)
# add both the built include dir and wxWidget src include dir
include_directories(<userhome>/wxWidgets/build-cocoa-debug/lib/wx/include/osx_cocoa-unicode-3.3 <userhome>/wxWidgets/include)
add_executable(stc stctest.cpp edit.cpp prefs.cpp) # just an simple app
target_link_directories(stc PUBLIC <userhome>/wxWidgets/build-cocoa-debug/lib)
target_link_libraries(stc -lwx_osx_cocoau_stc-3.3 -lwx_osx_cocoau_core-3.3 -lwx_baseu-3.3)
© 2022 - 2024 — McMap. All rights reserved.