将Perl代码迁移到Windows:缺少Udunits软件包? [英] Migration of Perl Code to Windows: Missing Udunits Package?
问题描述
我们有一些非常老的Perl脚本做一些数据库工作;脚本在Linux环境中运行,这已经过时了。一个带有.pl的Perl脚本加载一个包(带有.pm扩展名); .pm文件具有如下代码:
We have some very old Perl scripts doing some database work; the scripts run in a Linux environment, which is going obsolete. One Perl script with .pl loads a package (with .pm extension); the .pm file has code like:
use UDUNITS;
我的开发环境是安装了ActivePerl 5.2的Windows计算机。我想我可以加载其他软件包,除非我在Windows二进制文件中找不到UDUNITS软件包。
My development environment is a Windows machine with ActivePerl 5.2 installed. I think I am able to load other Packages fine except I can't find the UDUNITS package in a Windows binary.
有一种方法可以编译UDUNITS2包,每 http://fossies.org/linux/udunits/udunits2.html#Windows 但我无法编译使用CMake - 获取错误。我第一次与CMake。
There IS a way to compile UDUNITS2 package, per http://fossies.org/linux/udunits/udunits2.html#Windows but I am unable to compile using CMake--getting errors. My first time with CMake.
那么我的选择是什么?我不想在Linux上开发,因为我没有专业知识;并且我想过去的UDUNITS问题可能是我需要在Windows中。
So what are my options? I don't want to develop on Linux because I don't have the expertise; and also I think going past the UDUNITS problem may be all I need in Windows.
谢谢!
强大>更新我现在使用命令行方式:cmake CC =C:\Program文件(x86)\Microsoft Visual Studio 11.0 \VC\bin\cl.exeCXX =C: \Program文件(x86)\Microsoft Visual Studio 11.0 \VC\bin\cl.exe-DEXPAT_LIBRARY = c:\expat32\Bin\libexpat.dll ..
我可以看到'配置完成'和'生成完成',但也有一个消息像CUNIT找不到。构建文件被写入一个文件夹; 但是在哪里是DLL ?
推荐答案
您可以使用CPUN版本的UDUNITS2作为放弃更换?看起来有两个:
Are you able to use the CPAN versions of UDUNITS2 as a drop in replacement? There look to be two:
https:/ /metacpan.org/pod/Physics::Udunits2
https://metacpan.org/pod/Alien::UDUNITS2
这篇关于将Perl代码迁移到Windows:缺少Udunits软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!