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

General questions regarding the usage of CodeLite
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

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

Post 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

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif »

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

Make sure you have read the HOW TO POST thread
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

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

Post 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

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

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

Post 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 .... :?

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

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

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

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

Post Reply