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

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Widgets
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

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

Post by Widgets » Wed Dec 04, 2019 8:12 pm

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
Environment: Win 10 64-bit & Ubuntu 16.04
MSVC Express 2010, 2015, 2017
wxWidgets 3.1
Fight SPAM - report it with wxSR

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3580
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

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

Post by ONEEYEMAN » Wed Dec 04, 2019 8:34 pm

Hi,
Could you please try with 3.1.3?
Also - how did you build wxWidgets? What configure options did you pass?

Thank you.

Widgets
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

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

Post by Widgets » Wed Dec 04, 2019 9:16 pm

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
Environment: Win 10 64-bit & Ubuntu 16.04
MSVC Express 2010, 2015, 2017
wxWidgets 3.1
Fight SPAM - report it with wxSR

DavidHart
Site Admin
Site Admin
Posts: 3906
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

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

Post by DavidHart » Wed Dec 04, 2019 10:32 pm

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

Widgets
Super wx Problem Solver
Super wx Problem Solver
Posts: 357
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

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

Post by Widgets » Thu Dec 05, 2019 2:45 am

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.
Environment: Win 10 64-bit & Ubuntu 16.04
MSVC Express 2010, 2015, 2017
wxWidgets 3.1
Fight SPAM - report it with wxSR

Post Reply