HeeksCNC error: operands to ?: have different types “wchar_t” and “wxString”

I was compiling HeeksCNC as explained here:
https://code.google.com/p/heekscnc/wiki/DebianPackagesBuild

But when compiling it fails with this error message:

HeeksCNC.cpp:1402:46: error: operands to ?: have different types "wchar_t*" and "wxString"

I fixed it casting with (wxString):

$ vi src/HeeksCNC.cpp

From:
filename = (wxGetenv(wxT("XDG_CONFIG_HOME"))?wxGetenv(wxT("XDG_CONFIG_HOME")):wxFileName::GetHomeDir() + wxT("/.config")) + wxT("/heekscnc/") + resource;

To:
filename = (wxGetenv(wxT("XDG_CONFIG_HOME"))? (wxString) wxGetenv(wxT("XDG_CONFIG_HOME")):wxFileName::GetHomeDir() + wxT("/.config")) + wxT("/heekscnc/") + resource;

Now it compiles fine!

Advertisements

3 thoughts on “HeeksCNC error: operands to ?: have different types “wchar_t” and “wxString”

  1. many thanks for that, i have posted a link to this blog in the heekscnc building page with your solution, it might help othet than me.

    Good New Year and best regards

    carlo D.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s