New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unknown type name 'wxMediaCtrl' #283

Closed
dicemans opened this Issue May 10, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@dicemans

dicemans commented May 10, 2017

In file included from /usr/local/include/wx-3.0/wx/propgrid/propgrid.h:26:
/usr/local/include/wx-3.0/wx/propgrid/property.h:1049:15: warning: reference cannot be bound to dereferenced null pointer in
      well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
        if ( &values )
        ~~    ^~~~~~
../../../plugins/additional/additional.cpp:1290:3: error: unknown type name 'wxMediaCtrl'
                wxMediaCtrl* mc = new wxMediaCtrl((wxWindow *)parent, wxID_ANY, wxT(""),obj->GetPropertyAsPoint(_("pos")),
                ^
../../../plugins/additional/additional.cpp:1290:25: error: unknown type name 'wxMediaCtrl'
                wxMediaCtrl* mc = new wxMediaCtrl((wxWindow *)parent, wxID_ANY, wxT(""),obj->GetPropertyAsPoint(_("pos")),
                                      ^
../../../plugins/additional/additional.cpp:1303:100: error: use of undeclared identifier 'wxMEDIACTRLPLAYERCONTROLS_STEP'
  ...if(  obj->GetPropertyAsString( _("player_controls") ) == wxT("STEP") )     mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONT...
                                                                                                    ^
../../../plugins/additional/additional.cpp:1304:102: error: use of undeclared identifier 'wxMEDIACTRLPLAYERCONTROLS_VOLUME'
  ...if(  obj->GetPropertyAsString( _("player_controls") ) == wxT("VOLUME") )   mc->ShowPlayerControls(wxMEDIACTRLPL...
                                                                                                            ^
../../../plugins/additional/additional.cpp:1305:103: error: use of undeclared identifier 'wxMEDIACTRLPLAYERCONTROLS_DEFAULT'
  ...if(  obj->GetPropertyAsString( _("player_controls") ) == wxT("DEFAULT") )  mc->ShowPlayerControls(wxMEDIACTRLPL...
                                                                                                            ^
../../../plugins/additional/additional.cpp:1306:100: error: use of undeclared identifier 'wxMEDIACTRLPLAYERCONTROLS_NONE'
  ...if(  obj->GetPropertyAsString( _("player_controls") ) == wxT("NONE") )     mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONT...
                                                                                                    ^
../../../plugins/additional/additional.cpp:1318:55: error: use of undeclared identifier 'wxMEDIACTRLPLAYERCONTROLS_STEP'
                if(!obj->IsNull(_("style"))) mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONTROLS_STEP);
                                                                    ^
11 warnings and 7 errors generated.
make[1]: *** [obj/Release/additional-components-plugin/additional.o] Error 1
make: *** [additional-components-plugin] Error 2

@jhasse jhasse changed the title from Osx Problem to error: unknown type name 'wxMediaCtrl' May 10, 2017

@jhasse jhasse added macOS bug and removed bug labels May 10, 2017

@muellermartin

This comment has been minimized.

Show comment
Hide comment
@muellermartin

muellermartin Sep 20, 2017

Contributor

I have approximately the same error on macOS with the current version of wxFormBuilder:

==== Building TiCPP (release) ====
Linking TiCPP
==== Building plugin-interface (release) ====
xrcconv.cpp
wizard.cpp
../../../sdk/plugin_interface/forms/wizard.cpp:160:20: warning: comparison of
      unsigned expression >= 0 is always true [-Wtautological-compare]
    if ( pageIndex >= 0 && pageIndex < pageCount )  // Is it a valid index?
         ~~~~~~~~~ ^  ~
1 warning generated.
Linking plugin-interface
==== Building additional-components-plugin (release) ====
Creating ../../../output/lib/wxformbuilder
Creating obj/Release/additional-components-plugin
additional.cpp
../../../plugins/additional/additional.cpp:1358:3: error: unknown type name
      'wxMediaCtrl'
                wxMediaCtrl* mc = new wxMediaCtrl((wxWindow *)parent, wx...
                ^
../../../plugins/additional/additional.cpp:1358:25: error: unknown type name
      'wxMediaCtrl'
                wxMediaCtrl* mc = new wxMediaCtrl((wxWindow *)parent, wx...
                                      ^
../../../plugins/additional/additional.cpp:1371:100: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_STEP'
  ..._("player_controls") ) == wxT("STEP") )    mc->ShowPlayerControls(wxMEDIAC...
                                                                     ^
../../../plugins/additional/additional.cpp:1372:102: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_VOLUME'
  ...) == wxT("VOLUME") )       mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONT...
                                                        ^
../../../plugins/additional/additional.cpp:1373:103: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_DEFAULT'
  ...) == wxT("DEFAULT") )      mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONT...
                                                        ^
../../../plugins/additional/additional.cpp:1374:100: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_NONE'
  ..._("player_controls") ) == wxT("NONE") )    mc->ShowPlayerControls(wxMEDIAC...
                                                                     ^
../../../plugins/additional/additional.cpp:1386:55: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_STEP'
                if(!obj->IsNull(_("style"))) mc->ShowPlayerControls(wxME...
                                                                    ^
7 errors generated.
make[1]: *** [obj/Release/additional-components-plugin/additional.o] Error 1
make: *** [additional-components-plugin] Error 2

Update with workaround: It is obvious that wxMediaCtrl is missing and for me this is due to Homebrew installing wxMac without wxMediaCtrl (see line 79 in current version of wxMac Formula). As a workaround the build script for wxFormBuilder can be called with wxMediaCtrl disabled: ./create_build_files4.sh --disable-mediactrl. Unfortunaltely I'm still stuck with another error :(

Contributor

muellermartin commented Sep 20, 2017

I have approximately the same error on macOS with the current version of wxFormBuilder:

==== Building TiCPP (release) ====
Linking TiCPP
==== Building plugin-interface (release) ====
xrcconv.cpp
wizard.cpp
../../../sdk/plugin_interface/forms/wizard.cpp:160:20: warning: comparison of
      unsigned expression >= 0 is always true [-Wtautological-compare]
    if ( pageIndex >= 0 && pageIndex < pageCount )  // Is it a valid index?
         ~~~~~~~~~ ^  ~
1 warning generated.
Linking plugin-interface
==== Building additional-components-plugin (release) ====
Creating ../../../output/lib/wxformbuilder
Creating obj/Release/additional-components-plugin
additional.cpp
../../../plugins/additional/additional.cpp:1358:3: error: unknown type name
      'wxMediaCtrl'
                wxMediaCtrl* mc = new wxMediaCtrl((wxWindow *)parent, wx...
                ^
../../../plugins/additional/additional.cpp:1358:25: error: unknown type name
      'wxMediaCtrl'
                wxMediaCtrl* mc = new wxMediaCtrl((wxWindow *)parent, wx...
                                      ^
../../../plugins/additional/additional.cpp:1371:100: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_STEP'
  ..._("player_controls") ) == wxT("STEP") )    mc->ShowPlayerControls(wxMEDIAC...
                                                                     ^
../../../plugins/additional/additional.cpp:1372:102: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_VOLUME'
  ...) == wxT("VOLUME") )       mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONT...
                                                        ^
../../../plugins/additional/additional.cpp:1373:103: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_DEFAULT'
  ...) == wxT("DEFAULT") )      mc->ShowPlayerControls(wxMEDIACTRLPLAYERCONT...
                                                        ^
../../../plugins/additional/additional.cpp:1374:100: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_NONE'
  ..._("player_controls") ) == wxT("NONE") )    mc->ShowPlayerControls(wxMEDIAC...
                                                                     ^
../../../plugins/additional/additional.cpp:1386:55: error: use of undeclared
      identifier 'wxMEDIACTRLPLAYERCONTROLS_STEP'
                if(!obj->IsNull(_("style"))) mc->ShowPlayerControls(wxME...
                                                                    ^
7 errors generated.
make[1]: *** [obj/Release/additional-components-plugin/additional.o] Error 1
make: *** [additional-components-plugin] Error 2

Update with workaround: It is obvious that wxMediaCtrl is missing and for me this is due to Homebrew installing wxMac without wxMediaCtrl (see line 79 in current version of wxMac Formula). As a workaround the build script for wxFormBuilder can be called with wxMediaCtrl disabled: ./create_build_files4.sh --disable-mediactrl. Unfortunaltely I'm still stuck with another error :(

@holymonson

This comment has been minimized.

Show comment
Hide comment
@holymonson

holymonson commented Aug 3, 2018

Could be fixed in Homebrew/homebrew-core#30730

@jhasse

This comment has been minimized.

Show comment
Hide comment
@jhasse

jhasse Aug 8, 2018

Member

Someone with macOS please test if it works now :)

Member

jhasse commented Aug 8, 2018

Someone with macOS please test if it works now :)

@jhasse jhasse added this to the 3.9.0 milestone Aug 8, 2018

@muellermartin

This comment has been minimized.

Show comment
Hide comment
@muellermartin

muellermartin Aug 8, 2018

Contributor

Seem to work for me so far on macOS 10.13.6 with MediaCtrl enabled.

I will update the README accordingly.

Contributor

muellermartin commented Aug 8, 2018

Seem to work for me so far on macOS 10.13.6 with MediaCtrl enabled.

I will update the README accordingly.

muellermartin added a commit to muellermartin/wxFormBuilder that referenced this issue Aug 8, 2018

@muellermartin

This comment has been minimized.

Show comment
Hide comment
@muellermartin

muellermartin Aug 8, 2018

Contributor

I've updated the README in PR #462.

I also tried to build with meson and ninja as suggested for Linux. The build succeeds, but no .app bundle is created as with gmake. The binary also has some issues:

18:33:43: Error loading images: The file does not exist.
File: /Users/martin/Projects/wxFormBuilder/_install/bin/SharedSupport/xml/icons.xml <stringutils.cpp@221>
18:33:43: Error loading application: The file does not exist.
File: /Users/martin/Projects/wxFormBuilder/_install/bin/SharedSupport/xml/objtypes.xml <stringutils.cpp@221>
wxFormBuilder cannot continue.

Therefore I kept the instructions with gmake and only removed the note and flag regarding MediaCtrl.

Contributor

muellermartin commented Aug 8, 2018

I've updated the README in PR #462.

I also tried to build with meson and ninja as suggested for Linux. The build succeeds, but no .app bundle is created as with gmake. The binary also has some issues:

18:33:43: Error loading images: The file does not exist.
File: /Users/martin/Projects/wxFormBuilder/_install/bin/SharedSupport/xml/icons.xml <stringutils.cpp@221>
18:33:43: Error loading application: The file does not exist.
File: /Users/martin/Projects/wxFormBuilder/_install/bin/SharedSupport/xml/objtypes.xml <stringutils.cpp@221>
wxFormBuilder cannot continue.

Therefore I kept the instructions with gmake and only removed the note and flag regarding MediaCtrl.

jhasse added a commit that referenced this issue Aug 9, 2018

Update README as issue #283 seems to be fixed (#462)
* Update README as issue #283 seems to be fixed
* Add make as dependency and update Travis CI
* Increase timeout for devel build of wxWidgets 1.1

@jhasse jhasse closed this Aug 9, 2018

@jhasse

This comment has been minimized.

Show comment
Hide comment
@jhasse

jhasse Aug 9, 2018

Member

I also tried to build with meson and ninja as suggested for Linux. The build succeeds, but no .app bundle is created as with gmake.

Yeah that doesn't work yet (Windows probably also doesn't work).

I think the binary doesn't run because the paths are expected to be different on macOS.

Member

jhasse commented Aug 9, 2018

I also tried to build with meson and ninja as suggested for Linux. The build succeeds, but no .app bundle is created as with gmake.

Yeah that doesn't work yet (Windows probably also doesn't work).

I think the binary doesn't run because the paths are expected to be different on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment