Page 1 of 1

Mint & CMAKE & platform.h "#if with no expression"

Posted: Wed Dec 04, 2019 8:12 pm
by Widgets
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

Re: Mint & CMAKE & platform.h "#if with no expression"

Posted: Wed Dec 04, 2019 8:34 pm
by ONEEYEMAN
Hi,
Could you please try with 3.1.3?
Also - how did you build wxWidgets? What configure options did you pass?

Thank you.

Re: Mint & CMAKE & platform.h "#if with no expression"

Posted: Wed Dec 04, 2019 9:16 pm
by Widgets
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

Re: Mint & CMAKE & platform.h "#if with no expression"

Posted: Wed Dec 04, 2019 10:32 pm
by DavidHart
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

Re: Mint & CMAKE & platform.h "#if with no expression"

Posted: Thu Dec 05, 2019 2:45 am
by Widgets
DavidHart wrote:
Wed Dec 04, 2019 10:32 pm
What is the result of doing, in a terminal:
wx-config --cxxflags --libs
[email protected]:~$ 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
[email protected]:~$
DavidHart wrote:
Wed Dec 04, 2019 10:32 pm

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'?
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.