wxUiEditor icon indicating copy to clipboard operation
wxUiEditor copied to clipboard

Compiling problems

Open tester0077 opened this issue 2 years ago • 3 comments

I am very interested in using wxUiEditor, but as it stands I see that support for wxAui seems to be missing. I have used both wxCrafter & wxFormBuilder for some time and both have their strengths and missing features for my needs. Currently, I need support for Python so I can use wxPython code for OS agnostic utilities. Which is the best forum to sort out my compiling issues.

FWIW, I am running under Win 11, 64-bit using wxWidgets 3.2.2. I have installed MSys64 and have installed ninja as well a cmake, but am unsure as to where I need to run the build process. I am much more familiar with MSVC Visual Studio, but quite understand why you are using MSYS or mingw if you plan on making the app run under Linux or Mac OS.

Unfortunately, the build instructions are too sparse to get me going using either MSys or Mingw

Even the short discussion on the wxWidgets forum did not get me off the ground https://forums.wxwidgets.org/viewtopic.php?f=10&t=48819&p=209840&hilit=wxuieditor#p209840

tester0077 avatar Aug 23 '23 16:08 tester0077

There is support for wxAuiNotebook and wxAuiToolbar, but wxUiEditor does not currently support the main AUI manager.

As far as building wxUiEditor, you can use any toolchain supported by CMake. The one requirement is that the C++ compiler must support C++20. You definitely do not need MSYS or Mingw. I haven't personally tried this, but current versions of Visual Studio are supposed to support CMake projects, so you should in theory be able to use the CMakeLists.txt file in the root of the repository and have Visual Studio create a solution from that. If you have cmake-gui.exe installed and in your path, an even faster way is to start a Visual Studio cmd shell, go to the root of the repository and type:

start cmake-gui.exe --preset=ninja-multi -S .

That will configure CMake for you. After that run

cmake --build build --config Release --target wxUiEditor

This will build the executable in build\stage\bin\Release

You might also find the action file .github/workflows/daily_build.yml helpful -- this is how the daily builds are created, which builds with Visual Studio 17 on Windows.

If none of these suggestions get you to the point where you can build, either ask further on this issue, or switch over to the Discussions and create a new topic there. It'll still be mostly me responding, but that will make it a bit easier to find if other people have similar problems getting it to build.

KeyWorksRW avatar Aug 25 '23 04:08 KeyWorksRW

I have now been able to build a release version by using a command line window under MSVC 2022 community edition. Steps: open MSVC 2022 Select the folder where the wxUiEditor code is located for MSVC to open open the command window via MSVC Tools - Command line -> Developer Command Prompt run: start cmake-gui.exe --preset=ninja-multi -S . Click on Configure a couple of times and then run cmake --build build --config Release --target wxUiEditor in the MSVC command window. After a bit of time (and a few warnings during the compile), I was able to locate wxUiEditor.exe in D:\pkg\wx\wxUiEditor\build\stage\bin\Release which I was able to run and from what I can tell, it worked as expected. Next step was to build a debug version and it also ran without major issues. That version also ran without problems.

Thank you. Now the next effort for myself will be to try and come up with a suitable configuration which can be used to actively debug any test code.

tester0077 avatar Aug 30 '23 01:08 tester0077

Glad to hear this got resolved for you. I'm going to leave this issue open because I want to look further into getting something in place that makes it possible to build directly in Visual Studio without needing to use a command line.

KeyWorksRW avatar Sep 04 '23 21:09 KeyWorksRW