我可以在没有Visual Studio的情况下编译DLL吗? [英] Can I compile DLLs without Visual Studio?
问题描述
我的目的是采用一个C ++库,并用 SWIG ( alt.链接. ),然后将C ++和C#组件都编译为DLL,以用于Unity5.(C#DLL为Unity提供了与C ++ DLL的接口.)
My intention is to take a C++ library, wrap it for C# with SWIG (alt. link), and compile both C++ and C# components as DLLs for Unity 5. (The C# DLL provides Unity with an interface to the C++ DLL.)
据我所知,编译C ++和C#DLL始终需要Visual Studio(或VS随附的msbuild
之类的工具).但是,我目前正在努力安装VS,这使我对这一假设提出了质疑.
To the best of my knowledge, compiling C++ and C# DLLs always requires Visual Studio (or tools like msbuild
that come with VS). However, I am currently struggling to get VS installed, which has led me to question that assumption.
在Windows上是否还有其他用于编译Unity就绪DLL的选项?
Are there any other options for compiling Unity-ready DLLs on Windows?
(即使我安装了VS,我还是很想知道.)
(Even if I get VS installed, I'm still curious to know.)
推荐答案
是的,您可以使用 MinGW进行编译从命令行将C ++转换为DLL .
如果您希望使用GUI界面,则可以尝试代码::块.它与经过调整的MinGW版本捆绑在一起,但是由于它是基于GUI的IDE,因此您无需直接与其进行交互:)
If you prefer a GUI interface, you might try Code::Blocks. It comes bundled with a tweaked version of MinGW, but since it's a GUI-based IDE you don't have to interact with it directly :)
但是,您仍然需要将缠绕了代码的代码放入C#DLL中.我将研究MonoDevelop是否可以实现这一目标.
However, you'll still need to get your swig-wrapped code into a C# DLL. I'd investigate whether MonoDevelop can achieve this.
刚刚看到ReCoF的答案-看来您可以将MonoDevelop用于C#方面,所以您很高兴:)
Just seen ReCoF's answer - it seems you can use MonoDevelop for the C# side of things so you're good to go :)
这篇关于我可以在没有Visual Studio的情况下编译DLL吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!