Page 1 of 1

CMake build: wxUSE_UNICODE - error: #if with no expression

Posted: Thu Sep 07, 2023 9:16 pm
by coder99

Trying to compile an existing project code using Codelite 17.0.0 under Mint 21.2
Started a new project, set the Makefile generator to CMake
when I compile, I get:
/usr/local/include/wx-3.2/wx/platform.h:216:18: error: #if with no expression
which stalls everything.
I then try to define wxUSE_UNICODE in the compiler project settings under Preprocessor, but no luck at all.

Compiling the same code using the default Codelite builder & defining wxUSE_UNICODE in the same way is all that was needed to get a good compile for that generator

I am trying to use the CMake generator because I would like to build a flatpak for the app and am stuck on that issue as well


Re: CMake build: wxUSE_UNICODE - error: #if with no expression

Posted: Thu Sep 07, 2023 9:30 pm
by eranif

CodeLite does not know how to generate wxWidget CMake files, you will have to adjust them yourself


Re: CMake build: wxUSE_UNICODE - error: #if with no expression

Posted: Thu Sep 07, 2023 10:14 pm
by coder99

By now I have done more research and have found the CMake tutorial.

I can run Cmake for my sub projects without error, but if I run CMake for the main project, I get
c

Code: Select all

make /home/xxxxxPublic/pkg/Codelite/wxSk-CM
CMake Error at /usr/share/cmake-3.22/Modules/Compiler/GNU.cmake:6 (if):
  Maximum recursion depth of 1000 exceeded
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/Compiler/GNU-ASM.cmake:2 (include)
  /usr/share/cmake-3.22/Modules/CMakeASMInformation.cmake:22 (include)
  CMakeLists.txt:10 (enable_language)
-- Configuring incomplete, errors occurred!
See also "/home/xxxxPublic/pkg/Codelite/wxSk-CM/cmake-build-Debug/wxSk/CMakeFiles/CMakeOutput.log".
==== Done ====

The output log is almost 100 KB and, at this stage, really tells me nothing I can fix or understand


Re: CMake build: wxUSE_UNICODE - error: #if with no expression

Posted: Thu Sep 07, 2023 10:24 pm
by coder99

@eranif: I have tried that as well, but am not familiar enough with CMake and have been able to generate Unix makefiles, but have no idea where and how to run those.
My experience with Mint etc is way too short & shallow to be able to just run on my own.
My trial with trying to generate Codelite Ninja files were equally hopeless.
As I am constrained on the one side by what Flatpak will accept and my inexperience on the other and what the tools I use can handle on the third .... :?


Re: CMake build: wxUSE_UNICODE - error: #if with no expression

Posted: Fri Sep 08, 2023 5:07 am
by coder99

Another thought: I assumed changing the build generator should not make much difference.
If I can specify libraries for the default generator, I ought to be able to do so for any other that Codelite says it supports.
Possibly there are restrictions on those other options, but I have not seen them and you did not mention anything of the sort.

I am not trying to built wxWidgets, I just want to generate a 'makefile' build system such that the output will allow me to link to libraries just as the default make generator does.

I was simply hoping to have a build setup the I cam utilize and invoke from the Flatpak manifest.