haxeui / hxWidgets

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

error building showcase in mac #47

Closed vrescobar closed 3 years ago

vrescobar commented 7 years ago

Hello, I tried to compile the showcase in mac and doesn't work at all, I followed all the instructions for the setup (with latest hxcpp from git recompiled as the instructions say).

hxcpp=3.4.0 wxwidgets 3.0.2_4 MacOs version 10.12.4

Any idea on where to start debugging this? How could I provide more information?

If I try to build another simple project (using haxeui2-hxwidgets) I get the exact same error so I guess the problem might be in hxwidgets.

Here is the output for haxe build.hxml:

haxelib run hxcpp Build.xml haxe -Dhaxe3="1" -Dhaxe_ver="3.402" -DhxWidgets="0.0.1" -Dhxcpp="3.4.0" -Dhxcpp_api_level="331" -Dsource-header="GeneratedByHaxe" -Dsource_header="GeneratedByHaxe" -I"src/" -I"/Users/vresko/projects/vrkatsuyou/hxcpp/" -I"/usr/local/lib/haxe/lib/hxWidgets/git/src/" -I"/usr/lib/haxe/extraLibs/" -I"/usr/local/lib/haxe/extraLibs/" -I"" -I"/usr/lib/haxe/std/cpp/_std/" -I"/usr/share/haxe/std/cpp/_std/" -I"/usr/local/lib/haxe/std/cpp/_std/" -I"/usr/lib/haxe/std/" -I"/usr/share/haxe/std/" -I"/usr/local/lib/haxe/std/"
Creating /Users/vresko/projects/vrkatsuyou/hxWidgets/samples/00-Showcase/bin/obj/darwin64/__pch/haxe/hxcpp.h.gch...
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.

Compiling group: haxe
g++ -Iinclude -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/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/Users/vresko/projects/vrkatsuyou/hxcpp/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) ... tags=[haxe,static]
 - src/hx/widgets/TextCtrl.cpp 
 - src/hx/widgets/SystemOptions.cpp 
 - src/hx/widgets/StockBrushes.cpp 
 - src/hx/widgets/WebView.cpp 
In file included from ./src/hx/widgets/SystemOptions.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.
 - src/wx/widgets/StockBrushes.cpp 
Error: In file included from ./src/hx/widgets/WebView.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
./src/hx/widgets/WebView.cpp:68:28: error: member reference type 'wxWebView' is not a pointer; did you mean to use '.'?
HXDLIN(  13)                    (*(_hx_tmp))->Create(_hx_tmp1,id,tmp,_hx_tmp2,_hx_tmp3,style);
                                ~~~~~~~~~~~~^~
                                            .
1 warning and 1 error generated.
In file included from ./src/hx/widgets/StockBrushes.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.
In file included from ./src/wx/widgets/StockBrushes.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.
Error: Build failed
ianharrigan commented 7 years ago

Yeah, the right step is to start with hxWidgets, but im not 100% the best way to debug this, i dont have a mac, just a VM and its really old. Is there anything else on this issue list that might help?

ianharrigan commented 7 years ago

@sumo961?

ibilon commented 7 years ago

https://github.com/haxeui/hxWidgets/commit/a640921b4f304c044ee8baf90c372606d6b24cb8 should have fixed this.

Could you retest?

vrescobar commented 7 years ago

I updated to the latest version, deleted the previous build and recompiled.... but unfortunately I still get an error:

haxe build.hxml

haxelib run hxcpp Build.xml haxe -Dhaxe3="1" -Dhaxe_ver="3.402" -DhxWidgets="0.0.1" -Dhxcpp="3.4.0" -Dhxcpp_api_level="331" -Dsource-header="GeneratedByHaxe" -Dsource_header="GeneratedByHaxe" -I"src/" -I"/Users/vresko/projects/vrkatsuyou/hxcpp/" -I"/usr/local/lib/haxe/lib/hxWidgets/git/src/" -I"/usr/lib/haxe/extraLibs/" -I"/usr/local/lib/haxe/extraLibs/" -I"" -I"/usr/lib/haxe/std/cpp/_std/" -I"/usr/share/haxe/std/cpp/_std/" -I"/usr/local/lib/haxe/std/cpp/_std/" -I"/usr/lib/haxe/std/" -I"/usr/share/haxe/std/" -I"/usr/local/lib/haxe/std/"
Creating /Users/vresko/projects/vrkatsuyou/hxWidgets/samples/00-Showcase/bin/obj/darwin64/__pch/haxe/hxcpp.h.gch...
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.

Compiling group: haxe
g++ -Iinclude -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/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/Users/vresko/projects/vrkatsuyou/hxcpp/include -DHX_MACOS -m64 -Wno-parentheses -Wno-unused-value -Wno-format-extra-args -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) ... tags=[haxe,static]
 - src/hx/widgets/TextCtrl.cpp 
 - src/hx/widgets/StockBrushes.cpp 
 - src/hx/widgets/SystemOptions.cpp 
 - src/hx/widgets/WebView.cpp 
In file included from ./src/hx/widgets/SystemOptions.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.
 - src/wx/widgets/StockBrushes.cpp 
Error: In file included from ./src/hx/widgets/WebView.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
./src/hx/widgets/WebView.cpp:68:28: error: member reference type 'wxWebView' is not a pointer; did you mean to use '.'?
HXDLIN(  13)                    (*(_hx_tmp))->Create(_hx_tmp1,id,tmp,_hx_tmp2,_hx_tmp3,style);
                                ~~~~~~~~~~~~^~
                                            .
1 warning and 1 error generated.
In file included from ./src/hx/widgets/StockBrushes.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.
In file included from ./src/wx/widgets/StockBrushes.cpp:2:
In file included from /Users/vresko/projects/vrkatsuyou/hxcpp/include/hxcpp.h:327:
/Users/vresko/projects/vrkatsuyou/hxcpp/include/null.h:132:61: warning: binding dereferenced null pointer to reference has undefined behavior [-Wnull-dereference]
        { hx::NullReference("Function Call", false); return *(Dynamic *)0; }
                                                            ^~~~~~~~~~~~~
1 warning generated.
Error: Build failed