1

我正在尝试运行使用 wxGlade 生成的 Perl 代码,但我收到此错误

错误.

在文本中

无法为模块 Wx 加载“C:/Perl/site/lib/auto/Wx/Wx.dll”:load_file:在 C:/Perl/lib/Dynaloader.pm 第 191 行找不到指定的模块。

最终,我想使用从 wxGlade 生成的代码重新排列小部件。我没有 *.wxg 文件,我只有 Perl 代码。

如果这不可能,我想在 Perl 代码运行时查看小部件,然后我将在 wxGlade 中重新创建小部件。

我在 Windows 10 上使用 ActivePerl 5.16.3 Build 1604。我已经安装了 wxPerl 版本 0.9921。

这是结果where perl

C:\Windows\system32>where perl
C:\Perl\bin\perl.exe
C:\strawberry\perl\bin\perl.exe

下面是cpan Wx命令的结果。

C:\Windows\system32>cpan Wx
Set up gcc environment - 4.4.3
CPAN: Term::ANSIColor loaded ok (v4.02)
CPAN: Storable loaded ok (v2.45)
Reading 'C:\Perl\cpan\Metadata'
  Database was generated on Mon, 04 Dec 2017 06:54:07 GMT
Running install for module 'Wx'
Running make for M/MD/MDOOTSON/Wx-0.9932.tar.gz
CPAN: Digest::SHA loaded ok (v5.85)
CPAN: Compress::Zlib loaded ok (v2.063)
Checksum for C:\Perl\cpan\sources\authors\id\M\MD\MDOOTSON\Wx-0.9932.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.96)
Wx-0.9932/
Wx-0.9932/build/
Wx-0.9932/build/Wx/
Wx-0.9932/build/Wx/build/
Wx-0.9932/build/Wx/build/MakeMaker/
Wx-0.9932/build/Wx/build/MakeMaker/Any_OS.pm
Wx-0.9932/build/Wx/build/MakeMaker/Any_wx_config.pm
Wx-0.9932/build/Wx/build/MakeMaker/Core.pm
Wx-0.9932/build/Wx/build/MakeMaker/Hacks.pm
Wx-0.9932/build/Wx/build/MakeMaker/MacOSX_GCC.pm

Wx-0.9932/XS/SVGFileDC.xsp
Wx-0.9932/XS/TaskBarIcon.xs
Wx-0.9932/XS/TextAttr.xsp
Wx-0.9932/XS/TextCtrl.xsp
Wx-0.9932/XS/TextCtrlIface.xsp
Wx-0.9932/XS/TextEntryDialog.xs
Wx-0.9932/XS/Timer.xs
Wx-0.9932/XS/ToggleButton.xs
Wx-0.9932/XS/ToolBar.xs
Wx-0.9932/XS/Toolbook.xsp
Wx-0.9932/XS/ToolTip.xs
Wx-0.9932/XS/TopLevelWindow.xsp
Wx-0.9932/XS/Treebook.xsp
Wx-0.9932/XS/TreeCtrl.xs
Wx-0.9932/XS/Utils.xs
Wx-0.9932/XS/Validators.xs
Wx-0.9932/XS/VarHScrollHelper.xsp
Wx-0.9932/XS/VarHVScrollHelper.xsp
Wx-0.9932/XS/Variant.xsp
Wx-0.9932/XS/VarScrollHelperBase.xsp
Wx-0.9932/XS/VarVScrollHelper.xsp
Wx-0.9932/XS/VListBox.xsp
Wx-0.9932/XS/VScrolledWindow.xsp
Wx-0.9932/XS/Wave.xs
Wx-0.9932/XS/Window.xsp
Wx-0.9932/XS/Wizard.xs
CPAN: File::Temp loaded ok (v0.2304)
CPAN: Parse::CPAN::Meta loaded ok (v1.4409)
CPAN: CPAN::Meta loaded ok (v2.132830)
---- Unsatisfied dependencies detected during ----
----         MDOOTSON/Wx-0.9932.tar.gz        ----
    Alien::wxWidgets [build_requires]
Running make test
  Make had some problems, won't test
  Delayed until after prerequisites
Running make install
  Make had some problems, won't install
  Delayed until after prerequisites
Running install for module 'Alien::wxWidgets'
Running make for M/MD/MDOOTSON/Alien-wxWidgets-0.69.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\M\MD\MDOOTSON\Alien-wxWidgets-0.69.tar.gz ok
Alien-wxWidgets-0.69
Alien-wxWidgets-0.69/Build.PL
Alien-wxWidgets-0.69/Changes
Alien-wxWidgets-0.69/MANIFEST
Alien-wxWidgets-0.69/META.json

Alien-wxWidgets-0.69/patches/wxMac-2.8.10-fontdlg.patch
Alien-wxWidgets-0.69/patches/wxMac-2.8.3-brokengcc.patch
Alien-wxWidgets-0.69/patches/wxMac-2.9.0-textctrl.patch
Alien-wxWidgets-0.69/patches/wxWidgets-2.8.0-magic.patch
Alien-wxWidgets-0.69/patches/wxWidgets-2.8.10-gsocket.patch
Alien-wxWidgets-0.69/patches/wxWidgets-2.9.0-magic.patch
Alien-wxWidgets-0.69/patches/wxWidgets-2.9.0-msgdlg.patch
Alien-wxWidgets-0.69/patches/wxWidgets-2.9.4-plugin.patch
Alien-wxWidgets-0.69/patches/wxWidgets-3.0.2-webkit.patch
Alien-wxWidgets-0.69/script
Alien-wxWidgets-0.69/script/make_ppm.pl
Alien-wxWidgets-0.69/t
Alien-wxWidgets-0.69/t/01_load.t
Alien-wxWidgets-0.69/t/zy_pod_coverage.t
Alien-wxWidgets-0.69/t/zz_pod.t
CPAN: Module::CoreList loaded ok (v3.03)
CPAN: Module::Build loaded ok (v0.4203)

  CPAN.pm: Building M/MD/MDOOTSON/Alien-wxWidgets-0.69.tar.gz
    gmake: *** [gcc_mswudll\coredll_gdiplus.o] Error 1
    system: gmake -f makefile.gcc all  UNICODE=1 MSLU=0 BUILD=release SHARED=1  DEBUG_INFO=default DEBUG_FLAG=1 LDFLAGS=" -m32" CPPFLAGS="-m32 -D_USE_32BIT_TIME_T": 512 at inc/My/Build/Win32.pm line 284.
    dmake.exe:  Error code 130, while making 'all'
      MDOOTSON/Alien-wxWidgets-0.69.tar.gz
      C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
    CPAN: YAML::XS loaded ok (v0.41)
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Running make for M/MD/MDOOTSON/Wx-0.9932.tar.gz
    Warning: Prerequisite 'Alien::wxWidgets => 0.25' for 'MDOOTSON/Wx-0.9932.tar.gz' failed when processing 'MDOOTSON/Alien-wxWidgets-0.69.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
    CPAN: Time::HiRes loaded ok (v1.9726)

      CPAN.pm: Building M/MD/MDOOTSON/Wx-0.9932.tar.gz

    Set up gcc environment - 4.4.3
    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Alien::wxWidgets 0.25 not found.
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Socket
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DND
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::FS
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Grid
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Help
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Html
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::MDI
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Print
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::XRC
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::STC
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DocView
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Calendar
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DateTime
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Media
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::RichText
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::AUI
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DataView
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::PropertyGrid
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Ribbon
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::WebView
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::PerlTest
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::IPC
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl::SplashFast
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl::Carp
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl::TextValidator
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx
    Writing MYMETA.yml and MYMETA.json

    ======================================================================
    wxWidgets minimum supported version 2.007001 is missing.
    You will need to re-run Makefile.PL after it is installed.
    You must install wxWidgets using Alien::wxWidgets.
    ======================================================================

    ======================================================================
    For installation instructions and further help please see
    docs/INSTALL.pod

    For command line switches help use:
    perl Makefile.PL --help
    ======================================================================

    Warning: Prerequisite 'Alien::wxWidgets => 0.25' for 'MDOOTSON/Wx-0.9932.tar.gz' failed when processing 'MDOOTSON/Alien-wxWidgets-0.69.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
    Makefile out-of-date with respect to alien_wxwidgets_missing
    Cleaning current config before rebuilding Makefile...
    C:\STRAWB~1\c\bin\dmake.exe -f Makefile.old clean > NUL
    C:\Perl\bin\perl.exe Makefile.PL "INSTALLDIRS=site"
    Set up gcc environment - 4.4.3
    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Alien::wxWidgets 0.25 not found.
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Socket
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DND
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::FS
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Grid
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Help
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Html
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::MDI
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Print
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::XRC
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::STC
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DocView
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Calendar
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DateTime
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Media
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::RichText
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::AUI
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::DataView
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::PropertyGrid
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Ribbon
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::WebView
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::PerlTest
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::IPC
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl::SplashFast
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl::Carp
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl::TextValidator
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx::Perl
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx
    Writing MYMETA.yml and MYMETA.json
    Generating a dmake-style Makefile
    Writing Makefile for Wx
    Writing MYMETA.yml and MYMETA.json

    ======================================================================
    wxWidgets minimum supported version 2.007001 is missing.
    You will need to re-run Makefile.PL after it is installed.
    You must install wxWidgets using Alien::wxWidgets.
    ======================================================================

    ======================================================================
    For installation instructions and further help please see
    docs/INSTALL.pod

    For command line switches help use:
    perl Makefile.PL --help
    ======================================================================

    ==> Your Makefile has been rebuilt. <==
    ==> Please rerun the C:\STRAWB~1\c\bin\dmake.exe command.  <==
    C:\Perl\bin\perl.exe  -e "exit 1" --
    dmake.exe:  Error code 129, while making 'Makefile'
      MDOOTSON/Wx-0.9932.tar.gz
      C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible

我删除了ActivePerl并使用了Strawberry Perl。我发出cpan Wx然后我得到下面的错误。

在 .@INC 中找不到 Wx/Mini.pm(.@INC 包含:
C:\Program Files\ActiveState Komodo IDE 9\lib\support\dbgp\perllib
C:/strawberry/perl/site/lib/MSWin32- x86-多线程
C:/strawberry/perl/site/lib
C:/strawberry/perl/vendor/lib
C:/strawberry/perl/lib .)
在 C:/strawberry/perl/lib/Wx.pm 第 100 行.
BEGIN failed——编译在 C:/strawberry/perl/lib/Wx.pm 第 100 行中止。

mini.pm可以在 C:\strawberry\cpan\build\Wx-0.9932-zlzpbD\lib\Wx 中找到

4

1 回答 1

1

您的日志显示

Make had returned bad status, install seems impossible

所以安装失败,你没有Wx. 您还将看到构建正在尝试同时使用dmake(Strawberry Perl) 和gmake(Active Perl),并且它在此处引用了两个perl 实例

C:\STRAWB~1\c\bin\dmake.exe -f Makefile.old clean > NUL
C:\Perl\bin\perl.exe Makefile.PL "INSTALLDIRS=site"

所以它变得非常混乱

您需要删除其中一个以确保安全,因为 Windows 的行为受文件关联和PATH环境变量的影响,这与 Linux 不同。

你可以看看,berrybrew但我不知道它是否适用于 ActivePerl。

我通常更喜欢用于 Windows 的 Strawberry Perl,因为它与专有系统的联系较少。

于 2017-12-04T14:23:19.487 回答