Perl脚本设置抛出错误



继续这个问题。

当遵循openDDS安装指南时,我尝试从命令提示符内运行configure,但收到以下输出,收到以下错误集:

C:UsersSupervisorDesktopopendds>C:UsersSupervisorDesktopopenddsconfigure.cmd
Options:
'compiler' => 'gcc'
'verbose' => 1
host system is: win32
compiler is: gcc
Using ace_src: C:/Users/Supervisor/Desktop/opendds/ACE_wrappers
Using tao_src: C:/Users/Supervisor/Desktop/opendds/ACE_wrappers/TAO
ACE_ROOT/ace/config.h exists, skipping configuration of ACE+TAO
ENV: saving current environment
ENV: Appending ;C:UsersSupervisorDesktopopenddsACE_wrappersbin;C:UsersSupervisorDesktopopenddsbin;C:UsersSupervisorDesktopopend
dsACE_wrapperslib;C:UsersSupervisorDesktopopenddslib to PATH
ENV: Setting ACE_ROOT to C:UsersSupervisorDesktopopenddsACE_wrappers
ENV: Setting MPC_ROOT to C:UsersSupervisorDesktopopenddsACE_wrappersMPC
ENV: Setting CIAO_ROOT to unused
ENV: Setting TAO_ROOT to C:UsersSupervisorDesktopopenddsACE_wrappersTAO
ENV: Setting DDS_ROOT to C:UsersSupervisorDesktopopendds
ENV: Setting DANCE_ROOT to unused
Use of uninitialized value $mpctype in concatenation (.) or string at configure line 1028.
OpenDDS mwc command line: -type  C:UsersSupervisorDesktopopenddsDDS_TAOv2_all.mwc
Use of uninitialized value $mpctype in string eq at configure line 1031.
Running MPC to generate project files.
MPC_ROOT was set to C:UsersSupervisorDesktopopenddsACE_wrappersMPC.
Using .../opendds/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg
ERROR: Invalid type: C:UsersSupervisorDesktopopenddsDDS_TAOv2_all.mwc
mwc.pl v4.1.8
Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse]
              [-ti <dll | lib | dll_exe | lib_exe>:<file>] [-hierarchy]
              [-template <file>] [-relative NAME=VAL] [-base <project>]
              [-noreldefs] [-notoplevel] [-static] [-genins] [-use_env]
              [-value_template <NAME+=VAL | NAME=VAL | NAME-=VAL>]
              [-value_project <NAME+=VAL | NAME=VAL | NAME-=VAL>]
              [-make_coexistence] [-feature_file <file name>] [-gendot]
              [-expand_vars] [-features <feature definitions>]
              [-exclude <directories>] [-name_modifier <pattern>]
              [-apply_project] [-version] [-into <directory>]
              [-gfeature_file <file name>] [-nocomments]
              [-relative_file <file name>] [-for_eclipse]
              [-workers <#>] [-workers_dir <dir> | -workers_port <#>]
              [-language <cplusplus | csharp | java | vb>]
              [-type <automake | bcb2007 | bcb2009 | bds4 | bmake | cc | cdt6 |
                      cdt7 | em3 | ghs | gnuace | gnuautobuild | html | make |
                      nmake | rpmspec | sle | vc6 | vc7 | vc8 | vc10 | vc11 |
                      vc12 | vc14 | vc71 | vc9 | vxtest | wb26 | wb30 | wix>]
              [files]
       -base           Add <project> as a base project to each generated
                       project file.  Do not provide a file extension, the
                       .mpb extension will be tried first; if that fails the
                       .mpc extension will be tried.
       -exclude        Use this option to exclude directories or files when
                       searching for input files.
       -expand_vars    Perform direct expansion, instead of performing relative
                       replacement with either -use_env or -relative options.
       -feature_file   Specifies the feature file to read before processing.
                       The default feature file is default.features under the
                       config directory.
       -features       Specifies the feature list to set before processing.
       -for_eclipse    Generate files for use with eclipse.  This is only
                       useful for make based project types.
       -gendot         Generate .dot files for use with Graphviz.
       -genins         Generate .ins files for use with prj_install.pl.
       -gfeature_file  Specifies the global feature file.  The
                       default value is global.features under the
                       config directory.
       -global         Specifies the global input file.  Values stored
                       within this file are applied to all projects.
       -hierarchy      Generate a workspace in a hierarchical fashion.
       -include        Specifies a directory to search when looking for base
                       projects, template input files and templates.  This
                       option can be used multiple times to add directories.
       -into           Place all output files in a mirrored directory
                       structure starting at <directory>.  This should be a
                       full path.  If any project within the workspace is
                       referenced via a full path, use of this option is
                       likely to cause problems.
       -language       Specify the language preference; possible values are
                       [cplusplus, csharp, java, vb].  The default is
                       cplusplus.
       -make_coexistence If multiple 'make' based project types are
                       generated, they will be named such that they can coexist.
       -name_modifier  Modify output names.  The pattern passed to this
                       parameter will have the '*' portion replaced with the
                       actual output name.  Ex. *_Static
       -apply_project  When used in conjunction with -name_modifier, it applies
                       the name modifier to the project name also.
       -nocomments     Do not place comments in the generated files.
       -noreldefs      Do not try to generate default relative definitions.
       -notoplevel     Do not generate the top level target file.  Files
                       are still processed, but no top level file is created.
       -recurse        Recurse from the current directory and generate from
                       all found input files.
       -relative       Any $() variable in an mpc file that is matched to NAME
                       is replaced by VAL only if VAL can be made into a
                       relative path based on the current working directory.
                       This option can be used multiple times to add multiple
                       variables.
       -relative_file  Specifies the relative file to read before processing.
                       The default relative file is default.rel under the
                       config directory.
       -static         Specifies that only static projects will be generated.
                       By default, only dynamic projects are generated.
       -template       Specifies the template name (with no extension).
       -workers        Specifies number of child processes to use to generate
                       projects.
       -workers_dir    The directory for storing temporary output files
                       from the child processes.  The default is '/tmp/mpc'
                       If neither -workers_dir nor -workers_port is used,
                       -workers_dir is assumed.
       -workers_port   The port number for the parent listener. If neither
                       -workers_dir nor -workers_port is used, -workers_dir
                       is assumed.
       -ti             Specifies the template input file (with no extension)
                       for the specific type (ex. -ti dll_exe:vc8exe).
       -type           Specifies the type of project file to generate.  This
                       option can be used multiple times to generate multiple
                       types.  There is no longer a default.
       -use_env        Use environment variables for all uses of $() instead
                       of the relative replacement values.
       -value_project  This option allows modification of a project variable
                       assignment.  Use += to add VAL to the NAME's value.
                       Use -= to subtract and = to override the value.
                       This can be used to introduce new name value pairs to
                       a project.  However, it must be a valid project
                       assignment.
       -value_template This option allows modification of a template input
                       name value pair.  Use += to add VAL to the NAME's
                       value.  Use -= to subtract and = to override the value.
       -version        Print the MPC version and exit.
Error from MPC, stopped at configure line 1035.

正在运行的cmd脚本为:

@echo off
:: Win32 configure script wrapper for OpenDDS
:: Distributed under the OpenDDS License.
:: See: http://www.opendds.org/license.html
for %%x in (perl.exe) do set PERLPATH=%%~dp$PATH:x
if x%PERLPATH%==x (
  echo ERROR: perl.exe was not found.  This script requires ActiveState Perl.
  exit /b 1
)
set PERLPATH=
perl configure -verbose --compiler=gcc %*
if exist setenv.cmd call setenv.cmd

configure产生错误的部分为:

  my $mwcargs = "-type $mpctype $buildEnv->{'DDS_ROOT'}$slash$ws $static";
  $mwcargs .= ' ' . $opts{'mpcopts'} if defined $opts{'mpcopts'};
  print "OpenDDS mwc command line: $mwcargsn" if $opts{'verbose'};
  print 'Running MPC to generate ', ($mpctype eq 'gnuace' ? 'makefiles' :
                                     'project files'), ".n";
  if (!$opts{'dry-run'}) {
    if (system("perl $ENV{'ACE_ROOT'}/bin/mwc.pl $mwcargs") != 0) {
      die "Error from MPC, stopped";
    }
  }

其中设置了初始unset变量:

  my $mpctype = ($slash eq '/') ? 'gnuace' : $opts{'compiler_version'};

我已经安装了perl和visual studio。查找MPC我可以找到一个"多精度库"。这可能是因为我在使用gcc吗?我必须使用GCC,以便最终在此代码中创建一个与JNI一起使用的库…

您需要确保您正在使用ActiveState perl在windows上,其他perl变体似乎不能100%工作

相关内容

  • 没有找到相关文章

最新更新