haxeui / hxWidgets

Haxe externs (and wrappers) for wxWidgets
MIT License
77 stars 22 forks source link

Compilation failure(s) #44

Closed jcszymansk closed 7 years ago

jcszymansk commented 7 years ago

On OSX El Capitan, while trying to compile 00-Showcase:

Error: While running :g++ -I/Users/jsz/dev/tmp2/hxWidgets/samples/00-Showcase/bin/obj/darwin64/__pch/haxe -Iinclude -I/opt/brew/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/brew/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -fvisibility=hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -O2 -I/usr/local/lib/haxe/lib/hxcpp/git/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=331 -x c++ -frtti -Wno-invalid-offsetof ./src/hx/widgets/ComboBox.cpp -o/Users/jsz/dev/tmp2/hxWidgets/samples/00-Showcase/bin/obj/darwin64/edf3cd3c_ComboBox.o
./src/hx/widgets/ComboBox.cpp:81:26: error: no matching member function for call to 'Create'
HXDLIN(  13)                            _hx_tmp->Create(_hx_tmp1,id,_hx_tmp2,_hx_tmp3,_hx_tmp4,(int)0,(int)0,style);
                                        ~~~~~~~~~^~~~~~
/opt/brew/include/wx-3.0/wx/osx/combobox.h:77:10: note: candidate function not viable: no known conversion from 'int' to 'const wxString *' for 7th argument
    bool Create(wxWindow *parent, wxWindowID id,
         ^
/opt/brew/include/wx-3.0/wx/osx/combobox.h:86:10: note: candidate function not viable: no known conversion from 'int' to 'const wxArrayString' for 6th argument
    bool Create(wxWindow *parent, wxWindowID id,
         ^
./src/hx/widgets/ComboBox.cpp:91:27: error: no matching member function for call to 'Create'
HXDLIN(  17)                            _hx_tmp5->Create(_hx_tmp6,id,_hx_tmp7,_hx_tmp8,_hx_tmp9,(int)0,(int)0,style);
                                        ~~~~~~~~~~^~~~~~
/opt/brew/include/wx-3.0/wx/osx/combobox.h:77:10: note: candidate function not viable: no known conversion from 'int' to 'const wxString *' for 7th argument
    bool Create(wxWindow *parent, wxWindowID id,
         ^
/opt/brew/include/wx-3.0/wx/osx/combobox.h:86:10: note: candidate function not viable: no known conversion from 'int' to 'const wxArrayString' for 6th argument
    bool Create(wxWindow *parent, wxWindowID id,
         ^
2 errors generated.
/Users/jsz/dev/tmp2/hxWidgets/src/wx/widgets/WxString.hx:11: characters 11-17 : Warning : Unrecognized analyzer option: as_var
Error: Build failed

and Buttons from haxeui-examples:

Error: While running :g++ -I/Users/jsz/dev/tmp2/haxeui-examples/Buttons/build/hxwidgets/obj/darwin64/__pch/haxe -Iinclude -I/opt/brew/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/brew/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -fvisibility=hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -O2 -I/usr/local/lib/haxe/lib/hxcpp/git/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=331 -x c++ -frtti -Wno-invalid-offsetof ./src/hx/widgets/ClassInfo.cpp -o/Users/jsz/dev/tmp2/haxeui-examples/Buttons/build/hxwidgets/obj/darwin64/edf3cd3c_ClassInfo.o
./src/hx/widgets/ClassInfo.cpp:44:71: error: member reference base type 'const wxChar *' (aka 'const wchar_t *') is not a structure or union
HXLINE(  20)            return ::String(::String(this->_ref->ptr->GetClassName().c_str().AsChar()));
                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
1 error generated.
/Users/jsz/dev/tmp2/hxWidgets/src/wx/widgets/WxString.hx:11: characters 11-17 : Warning : Unrecognized analyzer option: as_var
Error: Build failed
ianharrigan commented 7 years ago

Do you know what version of wxWidgets you are using?

jcszymansk commented 7 years ago

Yes, freshly installed from brew wxmac-3.0.2_4.el_capitan.bottle.tar.gz. Also, all haxelibs updated from git just before.

calangoni commented 7 years ago

I have the same problem on linux

ianharrigan commented 7 years ago

Which versions of hxcpp / haxe?

calangoni commented 7 years ago

Haxe 3.4.0 and hxcpp from git (up to date)

jcszymansk commented 7 years ago

Changing cast 0 to null in these lines (13, 17; and a similar change in Choice.hx) allows the sample to compile, but I don't know how it would affect other platforms than mac.

ianharrigan commented 7 years ago

Great news! That works just fine this end @ibilon - any chance you could give it a run through on linux?

ibilon commented 7 years ago

Will do.

@jacekszymanski does changing cast 0 to untyped __cpp__("NULL") works too?

calangoni commented 7 years ago

I did the 3 modifications proposed by @jacekszymanski and it worked for me on Arch Linux. I could compile and run the sample. Thanks!

ianharrigan commented 7 years ago

OK, can you try latest and if it works, can we close this? Should be fixed now (hopefully)...

jcszymansk commented 7 years ago

@ibilon Yes it works, both examples compile.

ianharrigan commented 7 years ago

OK, this is great, i think the null is probably the more correct choice, this fix should be in github now, so can you close this if that version works.

Cheers, Ian

PS: any chance we could see some screens?

jcszymansk commented 7 years ago

Yes it works.

Screens of? Showcase on mac?

ianharrigan commented 7 years ago

Yeah, would be interesting

jcszymansk commented 7 years ago

Sure, will make some, probably on the weekend.

jcszymansk commented 7 years ago

Here you are:

hx01 hx02 hx03 hx04 hx05 hx06 hx07 hx08 hx09 hx10 hx11

ianharrigan commented 7 years ago

Fantastic, thanks! Looks ok for the most part... vertical components dont look right, neither does multiline text box... but apart from that looks ok.

Thanks again! Ian