简体   繁体   English

在64位Windows上从CMD调用cl(Visual Studio 2013)交叉编译器

[英]Invoke cl (Visual Studio 2013) cross-compiler from CMD on 64bit Windows

I have downloaded the LiE software 我已经下载了LiE软件

http://wwwmathlabo.univ-poitiers.fr/~maavl/LiE/ http://wwwmathlabo.univ-poitiers.fr/~maavl/LiE/

Unfortunately, I work on Windows 7 (64 bit) but the code seems to only target 32-bit Linux platforms (ie there is only a Makefile that uses the GNU make + gcc). 不幸的是,我在Windows 7(64位)上工作,但是代码似乎只针对32位Linux平台(即,只有使用GNU make + gcc的Makefile)。

My idea is to install the GNU make (and some other required tools) for Windows from GnuWin32 and adapt the provided Makefile to the Windows-environment by replacing gcc calls by calls to the VC++ 32-bit cross-compiler. 我的想法是从GnuWin32安装适用于Windows的GNU make(以及其他一些必需的工具),并通过调用VC ++ 32位交叉编译器代替gcc调用,使提供的Makefile适应Windows环境。 However, when I try to invoke the cross-compiler from the command prompt, I get the error "The dll mspdb120.dll is missing". 但是,当我尝试从命令提示符下调用交叉编译器时,出现错误“缺少dll mspdb120.dll”。 The question is: How do I invoke the cross-compiler from the command-prompt/GNU make for Windows without copying dlls around? 问题是:如何在不复制dll的情况下从Windows的命令提示符/ GNU make调用交叉编译器? Btw invoking the native 64 bit compiler goes off without a hitch by just calling the cl.exe by its fully specified name! 顺便说一句,仅通过使用完全指定的名称调用cl.exe,调用本机64位编译器就可以顺利进行了!

Thanks a lot! 非常感谢!

PS I'm using MS Visual Studio Express 2013 and the native-compiler is stored here: C:\\Software\\Development\\Microsoft Visual Studio 2013\\VC\\bin\\ The cross-compiler is, as expected, stored one level deeper: C:\\Software\\Development\\Microsoft Visual Studio 2013\\VC\\bin\\x86_amd64 PPS: I have tried to create a MS Visual Studio solution but the Makefile compiles three exe-files, the bison-parser is called externally + multiple source files are merged into a single object file -- the requirements that are extremely hard to implement using the VS-functionality -- so I have abandoned this futile endeavour. PS我正在使用MS Visual Studio Express 2013,并且本机编译器存储在此处:C:\\ Software \\ Development \\ Microsoft Visual Studio 2013 \\ VC \\ bin \\交叉编译器按预期的方式存储了更深的一级:C :\\\\ Software \\ Development \\ Microsoft Visual Studio 2013 \\ VC \\ bin \\ x86_amd64 PPS:我尝试创建MS Visual Studio解决方案,但Makefile编译了三个exe文件,在外部调用了bison解析器+合并了多个源文件放入单个目标文件中-使用VS功能很难实现这些要求-因此我放弃了这种徒劳的工作。

From the Windows command prompt, run the command C:\\Software\\Development\\Microsoft Visual Studio 2013\\VC\\bin\\x86_amd64\\vcvarsx86_amd64.bat . 在Windows命令提示符下,运行命令C:\\Software\\Development\\Microsoft Visual Studio 2013\\VC\\bin\\x86_amd64\\vcvarsx86_amd64.bat That will set up the PATH and other environment variables that need to be set to use the Microsoft compiler normally. 这将设置PATH和其他需要设置为正常使用Microsoft编译器的环境变量。 You'll need to rerun this command every time you open the Windows command prompt. 每次打开Windows命令提示符时,都需要重新运行此命令。

You can also use a shortcut included with your Visual Studio 2013 installation that will run this script automatically while opening a command prompt. 您还可以使用Visual Studio 2013安装附带的快捷方式,该快捷方式在打开命令提示符时将自动运行此脚本。 It's located in the Start menu under Visual Studio 2013 -> Visual Studio Tools -> VS2013 x64 Cross Tools Command Prompt . 它位于“开始”菜单中的“ Visual Studio 2013” ->“ Visual Studio工具” ->“ VS2013 x64交叉工具命令提示符”下 You can also find it at at C:\\Software\\Development\\Microsoft Visual Studio 2013\\Common7\\Tools\\Shortcuts\\VS2013 x64 Cross Tools Command Prompt.lnk . 您也可以在以下位置找到它: C:\\Software\\Development\\Microsoft Visual Studio 2013\\Common7\\Tools\\Shortcuts\\VS2013 x64 Cross Tools Command Prompt.lnk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM