I am trying to compile a project (wxWidgets 3.1.2) using Cmake under Mint 19.2 and I keep getting a number of error "#if with no expression" for the line
#if wxUSE_UNICODE
in platform.h and that is a show stopper
Cmake's 'Configure' & 'Generate' seem happy enough, aside from a comment about a policy CMP0065
Mint & CMAKE & platform.h "#if with no expression"
-
- Ultimate wxWidgets Guru
- Posts: 534
- Joined: Thu Jun 01, 2006 4:36 pm
- Location: Right here!
Mint & CMAKE & platform.h "#if with no expression"
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
-
- Part Of The Furniture
- Posts: 7481
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
Re: Mint & CMAKE & platform.h "#if with no expression"
Hi,
Could you please try with 3.1.3?
Also - how did you build wxWidgets? What configure options did you pass?
Thank you.
Could you please try with 3.1.3?
Also - how did you build wxWidgets? What configure options did you pass?
Thank you.
-
- Ultimate wxWidgets Guru
- Posts: 534
- Joined: Thu Jun 01, 2006 4:36 pm
- Location: Right here!
Re: Mint & CMAKE & platform.h "#if with no expression"
3.1.3 might be possible, but more work.
Was there a major change in platform.h?? surely others must have used CMake before this?
IIRC, the options were ../configure --with-gtk --disable-shared --with-zlib=$HOME/wxWidgets-3.1.2/zlib
Was there a major change in platform.h?? surely others must have used CMake before this?
IIRC, the options were ../configure --with-gtk --disable-shared --with-zlib=$HOME/wxWidgets-3.1.2/zlib
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
-
- Site Admin
- Posts: 4254
- Joined: Thu Jan 12, 2006 6:23 pm
- Location: IoW, UK
Re: Mint & CMAKE & platform.h "#if with no expression"
Hi,
What is the result of doing, in a terminal:
wx-config --cxxflags --libs
Or, if you 'point' to a different wx for your cmake project, the result of doing that command using /full/path/to/that/wx-config.
Can you successfully build some of the samples that come with wx e.g. 'minimal'?
Regards,
David
What is the result of doing, in a terminal:
wx-config --cxxflags --libs
Or, if you 'point' to a different wx for your cmake project, the result of doing that command using /full/path/to/that/wx-config.
Can you successfully build some of the samples that come with wx e.g. 'minimal'?
Regards,
David
-
- Ultimate wxWidgets Guru
- Posts: 534
- Joined: Thu Jun 01, 2006 4:36 pm
- Location: Right here!
Re: Mint & CMAKE & platform.h "#if with no expression"
wx-config --cxxflags --libs
....@Xeon-Mint-19:~$ wx-config --cxxflags --libs
-I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
-L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0
.....@Xeon-Mint-19:~$
In the end, I tried to build the CMake files using Codelite and that issue went away - though I still have a ways to go to get the full app compiled and linked.
In other trials, it seemed that defining __WXGTK__ helped get me further.
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2